From 4bd401a60069de0591e1f2e4914dfb3c3bb16f7b Mon Sep 17 00:00:00 2001 From: Jared Whiklo Date: Sun, 4 Dec 2016 12:32:15 -0600 Subject: [PATCH] Fix ldp:contains reference target and add default rdf map for fedora:hasParent,ldp:contains (#16) --- .../rdf.mapping.fedora_resource_type.rdf_source.yml | 10 +++++++++- islandora/src/Entity/FedoraResource.php | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/islandora/config/install/rdf.mapping.fedora_resource_type.rdf_source.yml b/islandora/config/install/rdf.mapping.fedora_resource_type.rdf_source.yml index c26306a1..cc55ce2d 100644 --- a/islandora/config/install/rdf.mapping.fedora_resource_type.rdf_source.yml +++ b/islandora/config/install/rdf.mapping.fedora_resource_type.rdf_source.yml @@ -6,7 +6,7 @@ dependencies: module: - islandora id: fedora_resource_type.rdf_source -targetEntityType: fedora_resource_type +targetEntityType: fedora_resource bundle: rdf_source types: - 'schema:Thing' @@ -34,3 +34,11 @@ fieldMappings: properties: - 'schema:author' mapping_type: rel + fedora_has_parent: + properties: + - 'fedora:hasParent' + mapping_type: rel + ldp_contains: + properties: + - 'ldp:contains' + mapping_type: rel diff --git a/islandora/src/Entity/FedoraResource.php b/islandora/src/Entity/FedoraResource.php index 7ae84542..a39ac73c 100644 --- a/islandora/src/Entity/FedoraResource.php +++ b/islandora/src/Entity/FedoraResource.php @@ -340,7 +340,7 @@ class FedoraResource extends ContentEntityBase implements FedoraResourceInterfac ->setLabel(t('LDP Contains')) ->setDescription(t('Contains Fedora Resource.')) ->setRevisionable(TRUE) - ->setSetting('target_type', 'fedora_resource_type') + ->setSetting('target_type', 'fedora_resource') ->setSetting('handler', 'default') ->setTranslatable(TRUE) ->setDisplayOptions('view', array(