Browse Source

modified to include isMemberOf and isPartOf in addition to isMemberOfCollection in mods:relatedItem

pull/105/head
mroy 14 years ago
parent
commit
09ff6035df
  1. 6
      workflow_client/plugins/mods_extend.inc

6
workflow_client/plugins/mods_extend.inc

@ -66,7 +66,10 @@ class mods_extend extends Process {
} }
} }
$collections= $relsExtDom->getElementsByTagName('isMemberOfCollection'); $relationships = array('isMemberOfCollection','isMemberOf','isPartOf');
foreach ($relationships as $relationship)
{
$collections= $relsExtDom->getElementsByTagName($relationship);
for ($i=0; $i < $collections->length; $i++) { for ($i=0; $i < $collections->length; $i++) {
$collection = $collections->item($i); $collection = $collections->item($i);
list(, $ident) = explode('/', $collection->getAttribute('rdf:resource')); list(, $ident) = explode('/', $collection->getAttribute('rdf:resource'));
@ -93,6 +96,7 @@ class mods_extend extends Process {
$modsRoot->appendChild($relatedItem); $modsRoot->appendChild($relatedItem);
} }
}
$identifier = $modsDom->createElement('mods:identifier', $pid); $identifier = $modsDom->createElement('mods:identifier', $pid);
$identifier->setAttribute('type', 'pid'); $identifier->setAttribute('type', 'pid');

Loading…
Cancel
Save