The Move to Islandora Kit is an extensible PHP command-line tool for converting source content and metadata into packages suitable for importing into Islandora (or other digital repository and preservations systems).
if (strlen($child_item_info->{$this->child_key})) {
where $this->child_key == "Child" and $child_item_info is
stdClass Object
(
[Identifier] => cpd2
[Child] =>
[Directory] => compound2
[Title] => Second compound object
[Author] => Neuman, Alfred E.
[Publication Date] => 1967
[key] => cpd2
)
...and that is why your test fails. I'm not clear on how this is supposed to work, but (off the top of my head) it would seem like you need to determine there are children first then check for any metadata they have?
Like inside this for each loop do a getItemInfo() there to see if there is metadata.
Related to the commented out test in XCsvCompoundToolchainTest
I'm assuming that the test metadata record is wrong, but here is what I am seeing.
Here you start writing the packages
Once inside the
CsvCompound
writer, you get to here to write the individual metadata record for the children.But this cache has already been written here and you are still using the
$record_key
ofcpd2
.So the same metadata is used.
So at line 156 you are checking
where
$this->child_key == "Child"
and$child_item_info
is...and that is why your test fails. I'm not clear on how this is supposed to work, but (off the top of my head) it would seem like you need to determine there are children first then check for any metadata they have?
Like inside this for each loop do a
getItemInfo()
there to see if there is metadata.But I'll leave this to you to work out.