public function extract($resource)
    {
        if (! $resource instanceof \core_kernel_classes_Resource) {
            throw new MetadataExtractionException(__('The given target is not an instance of core_kernel_classes_Resource'));
        }

        $identifier = \tao_helpers_Uri::getUniqueId($resource->getUri());
        $metadata = array($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;
    }