protected function getInfoDetails($dataObject) { /* * <dataObject name="Noark 5 arkivuttrekk"> * <properties> * <property name="info"> * <properties> * <property name="additionalInfo"> * * ... There are more objects in here that can be stored in ExtractionInfo ... * ... Just picking up antalldokumenter at the moment ... * <properties> * <property dataType="integer" name="antallDokumentfiler"> * <value>4</value> * */ $extractionInfo = new ArkivuttrekkExtractionInfo(); $attributeObject = $dataObject->attributes(); if (isset($attributeObject['name']) == true) { $extractionInfo->setDescription($attributeObject['name']); } else { $extractionInfo->setDescription(null); } foreach ($dataObject->properties->property->properties->property as $property) { $propertyAttributes = $property->attributes(); if (isset($propertyAttributes['name']) == true && strcasecmp($propertyAttributes['name'], 'type') == 0) { $extractionInfo->setType($property->value); $extractionInfo->setVersion($property->properties->property->value); } elseif (isset($propertyAttributes['name']) == true && strcasecmp($propertyAttributes['name'], 'additionalInfo') == 0) { foreach ($property->properties->property as $periodeInfo) { $periodeInfoAttributes = $periodeInfo->attributes(); if (isset($periodeInfoAttributes['name']) == true && strcasecmp($periodeInfoAttributes['name'], 'periode') == 0) { $periodeInfoInAndOut = $periodeInfo->properties->property; foreach ($periodeInfoInAndOut as $periodeInfoInAndOutProperty) { $periodeInfoInAndOutPropertyAttributes = $periodeInfoInAndOutProperty->attributes(); if (isset($periodeInfoInAndOutPropertyAttributes['name']) == true && strcasecmp($periodeInfoInAndOutPropertyAttributes['name'], 'inngaaendeSkille') == 0) { $periodeInfoIngaaende = $periodeInfoInAndOutProperty->value; $extractionInfo->setInngaaendeSkille($periodeInfoIngaaende); } elseif (isset($periodeInfoInAndOutPropertyAttributes['name']) == true && strcasecmp($periodeInfoInAndOutPropertyAttributes['name'], 'utgaaendeSkille') == 0) { $periodeInfoUtgaaende = $periodeInfoInAndOutProperty->value; $extractionInfo->setUtgaaendeSkille($periodeInfoUtgaaende); } // elseif } // foreach ($periodeInfoInAndOut as $periodeInfoInAndOutProperty ) { } elseif (isset($periodeInfoAttributes['name']) == true && strcasecmp($periodeInfoAttributes['name'], 'inneholderSkjermetInformasjon') == 0) { if (strcasecmp($periodeInfo->value, 'true') == 0) { $extractionInfo->setInneholderSkjermetInformasjon(true); } elseif (strcasecmp($periodeInfo->value, 'false') == 0) { $extractionInfo->setInneholderSkjermetInformasjon(false); } } elseif (isset($periodeInfoAttributes['name']) == true && strcasecmp($periodeInfoAttributes['name'], 'omfatterDokumenterSomErKassert') == 0) { if (strcasecmp($periodeInfo->value, 'true') == 0) { $extractionInfo->setOmfatterDokumenterSomErKassert(true); } elseif (strcasecmp($periodeInfo->value, 'false') == 0) { $extractionInfo->setOmfatterDokumenterSomErKassert(false); } } elseif (isset($periodeInfoAttributes['name']) == true && strcasecmp($periodeInfoAttributes['name'], 'inneholderDokumenterSomSkalKasseres') == 0) { if (strcasecmp($periodeInfo->value, 'true') == 0) { $extractionInfo->setInneholderDokumenterSomSkalKasseres(true); } elseif (strcasecmp($periodeInfo->value, 'false') == 0) { $extractionInfo->setInneholderDokumenterSomSkalKasseres(false); } } elseif (isset($periodeInfoAttributes['name']) == true && strcasecmp($periodeInfoAttributes['name'], 'inneholderVirksomhetsspesifikkeMetadata') == 0) { if (strcasecmp($periodeInfo->value, 'true') == 0) { $extractionInfo->setInneholderVirksomhetsspesifikkeMetadata(true); } elseif (strcasecmp($periodeInfo->value, 'false') == 0) { $extractionInfo->setInneholderVirksomhetsspesifikkeMetadata(false); } } elseif (isset($periodeInfoAttributes['name']) == true && strcasecmp($periodeInfoAttributes['name'], 'antallDokumentfiler') == 0) { $extractionInfo->setAntallDokumentfiler($periodeInfo->value); } } // foreach } // elseif (isset( } // foreach ( $this->arkivUttrekkDetails->setExtractionInfo($extractionInfo); }