Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orm.save with an rdf:type doesn't work with Fedora 4.0.0-alpha-3 #2

Closed
bmaddy opened this issue Feb 18, 2014 · 1 comment
Closed

orm.save with an rdf:type doesn't work with Fedora 4.0.0-alpha-3 #2

bmaddy opened this issue Feb 18, 2014 · 1 comment

Comments

@bmaddy
Copy link
Contributor

bmaddy commented Feb 18, 2014

There is a discrepancy with how the ldp gem and Fedora implement the ldp spec.

This bug is here as a reminder to resolve this discrepancy with the Fedora team.

By default, if you load a resource with the ldp gem and then save it, it will send all the triples it found back to Fedora. This includes the rdf:type. Fedora will throw an error when it gets an rdf:type it doesn't understand.

Workaround

As long as you aren't actually trying to set the rdf:type, you can just remove it to get the save to be successful:

orm.graph.delete([orm.resource.subject_uri, RDF::URI.new("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), nil])

Related info

Discussion on Fedora mailing list: https://groups.google.com/forum/#!topic/fedora-tech/2lLFN4_1LTI
A demonstration of what the ldp gem is trying to do (using curl): https://gist.github.com/bmaddy/9073793
The LDP spec: http://www.w3.org/TR/ldp/

@jcoyne
Copy link
Member

jcoyne commented Apr 18, 2014

       STATUS: 500 org.fcrepo.kernel.exception.MalformedRdfException: Unable to resolve registered namespace for resource http://www.w3.org/ns/ldp#Container
        at org.fcrepo.kernel.utils.iterators.PersistingRdfStreamConsumer.jcrMixinNameFromRdfResource(PersistingRdfStreamConsumer.java:181)
        at org.fcrepo.kernel.utils.iterators.RdfAdder.operateOnMixin(RdfAdder.java:64)
        at org.fcrepo.kernel.utils.iterators.PersistingRdfStreamConsumer.operateOnTriple(PersistingRdfStreamConsumer.java:133)
        at org.fcrepo.kernel.utils.iterators.PersistingRdfStreamConsumer.consume(PersistingRdfStreamConsumer.java:116)

jcoyne added a commit to samvera-deprecated/fedora_lens that referenced this issue Apr 18, 2014
@jcoyne jcoyne closed this as completed Jan 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants