Open emetsger opened 8 years ago
It isn't fully clear to me if the package ingest service could be modified to properly update skolemized blank nodes, or if Fedora even allows modification of blank nodes.
A work-around is to model the data using hash URIs instead of anonymous nodes.
I think Fedora does allow updates, the client just needs to know to seek them out individually to update them. Since we know that the only updates we need are bag URI mappings, one way around this would be to update the algorithm used for re-mapping objects.
Currently, after all objects have been deposited we visit every ingested object, scan them for the presence of bag URIs, then use the map of bag URIs to resource URIs to replace them.
With blank nodes, for each ingested object, we'd need to determine if the object of any triples are skolem resources. Then we'd need to iterate through each skolem resource and apply the same mapping. If the skolem resources have any triples whole object is another skoem resource, we'd need to visit those, etc.
The package ingest service is unable to deposit objects that have blank nodes containing
bag://
uris. For example, given an object in a package (elided for brevity):For example, the object of the
[] <osf:hasUser> <bag://MyPackage/data/obj/root/qmdz6.ttl>
triple will not be able to be updated from thebag://
URI to the Fedora repository URI. This is due to an intersection of Fedora behaviors and the algorithm used by the package ingest service to re-writebag://
URIs to the ultimate resource URI of deposited objects.Initial deposit of the object succeeds. Upon deposit, Fedora skolemizes the blank nodes. The secondary operation to update the
bag://
URIs fails because of the single subject restriction of Fedora, and the structure of the update:This manifests as a
403
being returned by Fedora when the update is attempted: