MarcusBarnes / islandora_compound_batch

Provides the basic ability to batch import compound objects into Islandora.
GNU General Public License v3.0
3 stars 12 forks source link

Adds code to grab the setting that specifies the predicate to use #29

Closed bseeger closed 6 years ago

bseeger commented 6 years ago

for the child relationship, versus it always being isConstituentOf, since the admin may have changed the predicate.

Resolves https://github.com/MarcusBarnes/islandora_compound_batch/issues/28

mjordan commented 6 years ago

I'll test this.

mjordan commented 6 years ago

With isPartOf set as the value of the Child relationship predicate setting, we're getting the expected predicate:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:fedora="info:fedora/fedora-system:def/relations-external#" xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:islandora="http://islandora.ca/ontology/relsext#">
  <rdf:Description rdf:about="info:fedora/mynamespace:69">
    <fedora:isPartOf rdf:resource="info:fedora/mynamespace:70"></fedora:isPartOf>
<islandora:isSequenceNumberOfmynamespace_70>2</islandora:isSequenceNumberOfmynamespace_70>
    <fedora-model:hasModel rdf:resource="info:fedora/islandora:sp_pdf"></fedora-model:hasModel>
  </rdf:Description>
</rdf:RDF>

Switching the Child relationship predicate setting back to isConstituentOf produces RELS-EXT datastreams that contain that relationship:


<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:fedora="info:fedora/fedora-system:def/relations-external#" xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:islandora="http://islandora.ca/ontology/relsext#">
  <rdf:Description rdf:about="info:fedora/mynamespace:78">
    <fedora:isConstituentOf rdf:resource="info:fedora/mynamespace:79"></fedora:isConstituentOf>
    <islandora:isSequenceNumberOfmynamespace_79>2</islandora:isSequenceNumberOfmynamespace_79>
    <fedora-model:hasModel rdf:resource="info:fedora/islandora:sp_pdf"></fedora-model:hasModel>
  </rdf:Description>
</rdf:RDF>

Merging. Thanks again @bseeger.