diff --git a/src/Plugin/ContextReaction/MappingUriPredicateReaction.php b/src/Plugin/ContextReaction/MappingUriPredicateReaction.php index a5ad5880..c59e48c8 100644 --- a/src/Plugin/ContextReaction/MappingUriPredicateReaction.php +++ b/src/Plugin/ContextReaction/MappingUriPredicateReaction.php @@ -91,7 +91,7 @@ class MappingUriPredicateReaction extends NormalizerAlterReaction { $tmp = $graph[$drupal_predicate]; $graph[$drupal_predicate] = [$tmp]; } - elseif (array_search($url, array_column($graph[$drupal_predicate], '@value'))) { + elseif (array_search($url, array_column($graph[$drupal_predicate], '@id'))) { // Don't add it if it already exists. return; } @@ -99,7 +99,7 @@ class MappingUriPredicateReaction extends NormalizerAlterReaction { else { $graph[$drupal_predicate] = []; } - $graph[$drupal_predicate][] = ["@value" => $url]; + $graph[$drupal_predicate][] = ["@id" => $url]; return; } } diff --git a/tests/src/Functional/MappingUriPredicateReactionTest.php b/tests/src/Functional/MappingUriPredicateReactionTest.php index 45ca762d..bf7bff6e 100644 --- a/tests/src/Functional/MappingUriPredicateReactionTest.php +++ b/tests/src/Functional/MappingUriPredicateReactionTest.php @@ -107,7 +107,7 @@ class MappingUriPredicateReactionTest extends IslandoraFunctionalTestBase { ); $this->assertEquals( "$url?_format=jsonld", - $json['@graph'][0]['http://www.w3.org/2002/07/owl#sameAs'][0]['@value'], + $json['@graph'][0]['http://www.w3.org/2002/07/owl#sameAs'][0]['@id'], 'Missing alter added predicate.' ); @@ -129,7 +129,7 @@ class MappingUriPredicateReactionTest extends IslandoraFunctionalTestBase { $json['@graph'][0], 'Still has old predicate'); $this->assertEquals( "$url?_format=jsonld", - $json['@graph'][0]['http://example.org/first/second'][0]['@value'], + $json['@graph'][0]['http://example.org/first/second'][0]['@id'], 'Missing alter added predicate.' ); } @@ -181,7 +181,7 @@ class MappingUriPredicateReactionTest extends IslandoraFunctionalTestBase { $json = \GuzzleHttp\json_decode($new_contents, TRUE); $this->assertEquals( "$media_url?_format=jsonld", - $json['@graph'][0]['http://www.iana.org/assignments/relation/describedby'][0]['@value'], + $json['@graph'][0]['http://www.iana.org/assignments/relation/describedby'][0]['@id'], 'Missing alter added predicate.' ); $this->assertEquals(