Hi Michael,
Kowari runs inside Fedora in "embedded" mode, so these Kowari-specific features are not exposed. I think your best bet would be to get the triples for the objects that have changed since the last time you checked. This is a similar strategy to what the OAI provider service does and it works fine.
By the way, have you used 10g's RDF functionality yet? I've given it a whirl. The folks at Case Western have dug deeper, and actually wrote a Trippi connector for it. So far it has been pretty disappointing in terms of update performance, but I'm no Oracle wiz...maybe my discombobulator was configured wrong. Regardless, it may be quite practical for certain non-OLTP applications. I'm just curious about your experience with it.
Regards,
Chris
_______________________________________________
Fedora-users mailing list
Fedora...@comm.nsdl.org
http://comm.nsdl.org/mailman/listinfo/fedora-users
Hi Michael,
If I understand your situation, you've got the RI disabled
and the only triplestore you're interested in populating
is the external one (Oracle)? If that's right, the logic
you gave below should do the trick. To be clear:
1) query the /fedora/search interface (aka "findObjects")
for PIDs of objects that have changed
2) for each PID:
a) call fedora/get/pid/RELS-EXT to get the outgoing triples
b) delete all triples from your target triplestore with
that pid (actually, the URI "info:fedora/$pid") as the
subject.
c) add the triples you just got from RELS-EXT
Depending on the cost of modifications to Oracle, it may be
economical to avoid more changes than absolutely necessary.
That is, compare the triples in RELS-EXT to the triples in
Oracle for a given Fedora object, and only do deletes and/or
adds of the specific triples that changed.
- Chris
Hi Michael,
If you have the RI on, it opens up the possibility for more efficient
incremental updates (but see caveats below). For example:
Use itql via /fedora/risearch to get all the info from
RELS-EXT for all objects that have changed since some date.
Something like the query below:
select $fedoraObject $rel $val from <#ri>
where $fedoraObject <fedora-view:lastModifiedDate> $modDate
and $modDate <tucana:after> "2006-01-01T10:22:33.001Z" in <#xsd>
and $fedoraObject $rel $val
Caveats:
1) It's dependent on the RI running and Kowari being the underlying RI
triplestore, since it uses itql.
2) You'll get back more triples than just what was in RELS-EXT.
See http://www.fedora.info/download/2.1.1/userdocs/server/resourceIndex/triples.html
for the full list. So your app would have to filter those out if they're not desired.
In the future, we want Fedora to be able to proactively supply apps with
change notification for objects, via JMS. So the query-for-changes
step won't always be necessary to support this sort of thing.