getUri()); $metadata = [$identifier => []]; $triples = $resource->getRdfTriples(); /** @var \core_kernel_classes_Triple $triple */ foreach ($triples->getIterator() as $triple) { /** @var \core_kernel_classes_Resource $property */ $property = $this->getResource($triple->predicate); $value = $triple->object; if ( trim($value) != '' && $property->isProperty() && !in_array($property->getUri(), self::$excludedProperties) ) { $metadata[$identifier][] = new ClassificationMetadataValue( new ClassificationSourceMetadataValue($resource->getUri(), $property->getUri()), [new ClassificationEntryMetadataValue($resource->getUri(), $value)] ); } } if (empty($metadata[$identifier])) { return []; } return $metadata; } }