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

Work on #14. #15

Closed mjordan closed 7 years ago

mjordan commented 7 years ago

To test, unzip the attached input data. It should have a structure like:

├── compound1
│   ├── 01
│   │   ├── MODS.xml
│   │   └── OBJ.tif
│   ├── 02
│   │   ├── MODS.xml
│   │   └── OBJ.tif
│   ├── 03
│   │   ├── MODS.xml
│   │   └── OBJ.tif
│   ├── MODS.xml
│   └── structure.xml
└── compound2
    ├── 01
    │   ├── MODS.xml
    │   └── OBJ.tif
    ├── 02
    │   ├── MODS.xml
    │   └── OBJ.pdf
    ├── 03
    │   ├── MODS.xml
    │   └── OBJ.jpg
    ├── 04
    │   ├── MODS.xml
    │   └── OBJ.tif
    ├── MODS.xml
    └── structure.xml

Notice that compound2's second child is a PDF, and its third is a JPG.

Run the following, adjusting the value of --namespace, --target, and --parent to suit your local requirements:

drush -v --user=admin islandora_compound_batch_preprocess --target=/tmp/csv_compound_output --namespace=mynamespace --content_models=pdf::islandora:placeCModel,jpg::islandora:eventCModel --parent=islandora:compound_collection

Then run drush -v --user=admin islandora_batch_ingest as usual.

The result of specifying the contend models for child objects created from the PDF and JPG files is that in "second compound object," the second child should have a content model of "Islandora Place Content Model". The third child should have a content model of "Islandora Event Content Model."

issue14test.zip

MarcusBarnes commented 7 years ago

@mjordan Thank you - I'll test when I have a moment and merge if everything appears to work as expected.

MarcusBarnes commented 7 years ago

@mjordan Tested as you outlined. I noticed that additional to the eventCModel and placeCModel, the second and third child objects of the second compound object also have entityCModel in their RELS-EXT. Is this the case with you and is this expected? Thank you.

mjordan commented 7 years ago

I'm guessing that entity is a superclass of event and place. In other words, having the additional content model for place and event may be normal.

Can you retest by assigning some more "conventional" cmodel to PDF such as auidio or video?

MarcusBarnes commented 7 years ago

When I retest using cmodel's that are installed by default in Islandora, only that cmodal appears (not the additional entityCModel as in my previous comment). Thoughts?

mjordan commented 7 years ago

For all I know it may be normal for place and event cmodel objects to also have the entity cmodel. If that's the case, everything appears to "just work". I'll confirm that in those solution packs' code this evening.

mjordan commented 7 years ago

@MarcusBarnes I'm not seeing this behavior in objects that I batch ingest - there is only one (the expected) content model in the RELS-EXT:

<rdf:RDF>
  <rdf:Description rdf:about="info:fedora/mynamespace:635"><fedora:isConstituentOf rdf:resource="info:fedora/mynamespace:632"/>
<islandora:isSequenceNumberOfmynamespace_632>2</islandora:isSequenceNumberOfmynamespace_632>
  <fedora-model:hasModel rdf:resource="info:fedora/islandora:placeCModel"/></rdf:Description>
</rdf:RDF>

I wonder if local configuration can account for the difference in what we are seeing?

MarcusBarnes commented 7 years ago

@mjordan I'm using a very basic islandora vagrant based VM to test, so yes, it's possible that there are configuration differences - for example, I may not have certain types of content models installed.

mjordan commented 7 years ago

When you create a Place using the standard GUI, do you also get the entity content model in the Place's RELS-EXT? I don't.

mjordan commented 7 years ago

@MarcusBarnes I think the behavior you are seeing is the correct one. I've just tested on a clean Vagrant running HEAD of the Entity solution pack and can see what you describe.

I'd say that everything is working as intended, other than the Entity SP on my vagrant.