rubydora icon indicating copy to clipboard operation
rubydora copied to clipboard

Can't get relationships from existing object

Open awead opened this issue 11 years ago • 0 comments

Not sure if I'm doing something wrong, but:

>  obj.class
=> Rubydora::DigitalObject
>  obj.relationships
=> {}
>  obj.datastreams["RELS-EXT"].content
=> \n<rdf:RDF xmlns:ns0=\"info:fedora/fedora-system:def/relations-external#\" xmlns:ns1=\"info:fedora/fedora-system:def/model#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n  <rdf:Description rdf:about=\"info:fedora/sufia:rb68xc11m\">\n    <ns1:hasModel rdf:resource=\"info:fedora/afmodel:GenericFile\"></ns1:hasModel>\n    <ns0:isPartOf rdf:resource=\"info:fedora/sufia:rb68xc09k\"></ns0:isPartOf>\n  </rdf:Description>\n</rdf:RDF>\n"

There's an isPartOf in the content of the datastream and I thought calling .relationships would parse that out for me.

awead avatar Oct 18 '14 16:10 awead