SELECT ?object ?book WHERE { ?object <fedora-model:hasModel> <info:fedora/fedora-system:FedoraObject-3.0> ; <fedora-rels-ext:isMemberOf> ?book . OPTIONAL { ?book <fedora-model:hasModel> ?model . } FILTER(!bound(?model)) }
SELECT ?object ?collection WHERE { ?object <fedora-model:hasModel> <info:fedora/fedora-system:FedoraObject-3.0> ; <fedora-rels-ext:isMemberOfCollection> ?collection . OPTIONAL { ?collection <fedora-model:hasModel> ?model . } FILTER(!bound(?model)) }
The phenomenon of objects getting orphaned when a collection is deleted has been discussed in the past, I believe, but we've got no solution for it. I recently discovered a number of objects in my repository that have no parent collection, and their RELS-EXT lists their parent as a collection that no longer exists.I'd like to write up a module that lists all objects where the isMemberOfCollection is a value that no longer exists, so that they can be looked at and dealt with. Is there a simple way to generate such a list?
--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
Visit this group at https://groups.google.com/group/islandora.
To view this discussion on the web visit https://groups.google.com/d/msgid/islandora/7516e09c-b312-47af-be2a-7fa586491d9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/islandora/64732b1b-6125-4d7b-a78f-0436cd0f0162%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/islandora.
To view this discussion on the web visit https://groups.google.com/d/msgid/islandora/efda39a8-d583-48ea-8d3f-4994c24fe550%40googlegroups.com.
$query = <<<EOQ[... The query Phil provided ...]EOQ;$connection = islandora_get_tuque_connection();$results = $connection->repository->ri->sparqlQuery($query, -1);$mapper = function ($result) {return $result['pid']['value'];};$options = drupal_map_assoc(array_map($mapper, $results));[... and then go stick that $options list in a form ...]
To view this discussion on the web visit https://groups.google.com/d/msgid/islandora/efda39a8-d583-48ea-8d3f-4994c24fe550%40googlegroups.com.