Thanks Chris - I believe I can almost claim a grok on this one!
p
On 11/22/10 2:24 PM, "Chris Wilper" <cwil...@duraspace.org> wrote:
Hi Patrick,
To add the statement you want (e.g. (some object) (rel:isCollection)
(true)), you'd need to specify:
For subject: The URI of the object. This is the PID, prepended with
"info:fedora/". For example, "info:fedora/demo:ExampleObject".
For predicate: The URI of the relationship. This is the namespace URI
of "rel" appended to the localname (isCollection). For example, if
the namespace URI is "http://example.org/myns#", the predicate URI
would be "http://example.org/myns#isCollection".
For object: "true" (a Literal)
A couple things to keep in mind when using addRelationship:
1) If you tend to call it a lot, make sure the RELS-EXT (or RELS-INT,
if specifying a datastream relationship) has VERSIONABLE set to false.
Otherwise, your objects are going to get very big (old versions will
be kept around, by default, in the XML).
2) addRelationship doesn't give you any control over how the given
triple is serialized within the RDF/XML. It will be valid RDF/XML,
but the namespace declaration (particularly the prefix) won't be as
human-readable as you could get if you used modifyDatastream instead.
Hope this helps,
Chris
On Mon, Nov 22, 2010 at 1:52 PM, Yott, Patrick <p.y...@neu.edu> wrote:
> Quick question about the addRelationship method...
>
> I'm putting together an external interface to our Fedora repository that
> allows users to create collection objects. The documentation for the API-A
> suggests that to use the addRelationship method we have to pass a triple to
> the system. Is it possible to pass a simple tupple? Specifically, I'd like
> to programmatically pass info to add this RDF statement to the RELS-EXT
> datastream:
>
> <rel:isCollection>true</rel:isCollection>
>
>
> Thanks,
>
> Patrick
>
> Patrick M. Yott
> Digital Library Manager
> Northeastern University Libraries
> 360 Huntington Avenue, SL270
> Boston, MA 02120
> p 617.373.4194
> f 617.373.5409
> p.y...@neu.edu
>
>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Fedora-commons-users mailing list
> Fedora-commons-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>
>
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
Patrick M. Yott
Digital Library Manager
Northeastern University Libraries
360 Huntington Avenue, SL270
Boston, MA 02120
p 617.373.4194
f 617.373.5409
p.y...@neu.edu
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users