protected function processDmdSec($xml, $informationObject = null) { if (!isset($informationObject)) { $informationObject = new QubitInformationObject(); } foreach ($xml->xpath('.//mdWrap/xmlData/dublincore/*') as $item) { $value = $item->__toString(); if (0 == strlen(trim($value))) { continue; } switch (str_replace('dcterms:', '', $item->getName())) { case 'title': $informationObject->title = $value; break; case 'creator': $informationObject->setActorByName($value, array('event_type_id' => QubitTerm::CREATION_ID)); break; case 'coverage': $informationObject->setAccessPointByName($value, array('type_id' => QubitTaxonomy::PLACE_ID)); break; case 'subject': $informationObject->setAccessPointByName($value, array('type_id' => QubitTaxonomy::SUBJECT_ID)); break; case 'description': $informationObject->scopeAndContent = $value; break; case 'publisher': $informationObject->setActorByName($value, array('event_type_id' => QubitTerm::PUBLICATION_ID)); break; case 'contributor': $informationObject->setActorByName($value, array('event_type_id' => QubitTerm::CONTRIBUTION_ID)); break; case 'date': $informationObject->setDates($value); break; case 'type': foreach (QubitTaxonomy::getTermsById(QubitTaxonomy::DC_TYPE_ID) as $item) { if (strtolower($value) == strtolower($item->__toString())) { $relation = new QubitObjectTermRelation(); $relation->term = $item; $informationObject->objectTermRelationsRelatedByobjectId[] = $relation; break; } } break; case 'format': $informationObject->extentAndMedium = $value; break; case 'identifier': $informationObject->identifier = $value; break; case 'source': $informationObject->locationOfOriginals = $value; break; case 'language': $informationObject->language = array($value); break; case 'isPartOf': // TODO: ? break; case 'rights': $informationObject->accessConditions = $value; break; } } return $informationObject; }