diff --git a/metafix/src/main/java/org/metafacture/metafix/maps/RdfMap.java b/metafix/src/main/java/org/metafacture/metafix/maps/RdfMap.java index c2be7993..53131534 100644 --- a/metafix/src/main/java/org/metafacture/metafix/maps/RdfMap.java +++ b/metafix/src/main/java/org/metafacture/metafix/maps/RdfMap.java @@ -56,7 +56,7 @@ */ public final class RdfMap extends AbstractReadOnlyMap { public static final String TARGET = "target"; - public static final String TARGET_LANGUAGE = "target_language"; + public static final String TARGET_LANGUAGE = "select_language"; public static final String SELECT = "select"; private static final int MAX_REDIRECTIONS = 10; private static final int MIN_HTTP_STATUS_CODE = 299; diff --git a/metafix/src/test/java/org/metafacture/metafix/MetafixLookupTest.java b/metafix/src/test/java/org/metafacture/metafix/MetafixLookupTest.java index 797656d6..dfbd1be6 100644 --- a/metafix/src/test/java/org/metafacture/metafix/MetafixLookupTest.java +++ b/metafix/src/test/java/org/metafacture/metafix/MetafixLookupTest.java @@ -1049,7 +1049,7 @@ public void shouldLookupRdfUrlWithRedirection() { public void shouldLookupInExternalRdfMapGetObjectOfSubjectWithTargetedPredicateOfSpecificLanguage() { MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList( "set_array('prefLabel', 'https://w3id.org/kim/hochschulfaechersystematik/n4')", - "lookup_rdf('prefLabel.*', '" + RDF_MAP + "', target: 'skos:prefLabel', target_language: 'de')" + "lookup_rdf('prefLabel.*', '" + RDF_MAP + "', target: 'skos:prefLabel', select_language: 'de')" ), i -> { i.startRecord("1"); @@ -1067,7 +1067,7 @@ public void shouldLookupInExternalRdfMapGetObjectOfSubjectWithTargetedPredicateO public void shouldLookupInExternalRdfMapGetSubjectWithTargetedPredicateOfSpecificLanguage() { MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList( "set_array('id', 'Mathematics, Natural Sciences')", - "lookup_rdf('id.*', '" + RDF_MAP + "', target: 'skos:prefLabel', target_language: 'en')" + "lookup_rdf('id.*', '" + RDF_MAP + "', target: 'skos:prefLabel', select_language: 'en')" ), i -> { i.startRecord("1"); @@ -1086,7 +1086,7 @@ public void shouldLookupInExternalRdfMapGetSubjectWithTargetedPredicateOfSpecifi @Test // Scenario lookupRdfPropertyToProperty public void shouldLookupInExternalRdfMapGetPropertyOfSpecificLanguageWithTargetedPredicate() { MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList( - "lookup_rdf('a', '" + HCRT_RDF_MAP + "', target: 'skos:prefLabel', target_language: 'en')" + "lookup_rdf('a', '" + HCRT_RDF_MAP + "', target: 'skos:prefLabel', select_language: 'en')" ), i -> { i.startRecord("1"); @@ -1122,7 +1122,7 @@ public void shouldLookupInExternalRdfMapGetSubjectOfPropertyWithTargetedPredicat @Test public void lookupRdfDefinedPropertyToSubjectNonDefault() { MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList( - "lookup_rdf('a', '" + HCRT_RDF_MAP + "', target: 'skos:prefLabel', target_language: 'de')" + "lookup_rdf('a', '" + HCRT_RDF_MAP + "', target: 'skos:prefLabel', select_language: 'de')" ), i -> { i.startRecord("1"); @@ -1160,7 +1160,7 @@ public void shouldLookupInExternalRdfMapGetObjectWithTargetedPredicateOfSpecific @Test public void shouldLookupRdfDefinedPropertyToSubject() { MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList( - "lookup_rdf('a', '" + HCRT_RDF_MAP + "', target: 'skos:prefLabel', target_language: 'de', select: 'subject')" + "lookup_rdf('a', '" + HCRT_RDF_MAP + "', target: 'skos:prefLabel', select_language: 'de', select: 'subject')" ), i -> { i.startRecord("1"); @@ -1204,7 +1204,7 @@ public void shouldLookupRdfDefinedPropertyToSubject() { private void shouldLookupInExternalRdfMapGetObjectWithTargetedPredicateOfSpecificLanguage(final String target) { MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList( "set_array('prefLabel', 'Mathematics, Natural Sciences')", - "lookup_rdf('prefLabel.*', '" + RDF_MAP + "', target: '" + target + "', target_language: 'de')" + "lookup_rdf('prefLabel.*', '" + RDF_MAP + "', target: '" + target + "', select_language: 'de')" ), i -> { i.startRecord("1"); diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfDefinedPropertyToProperty/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfDefinedPropertyToProperty/test.fix index 88563268..ad18850e 100644 --- a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfDefinedPropertyToProperty/test.fix +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfDefinedPropertyToProperty/test.fix @@ -1,4 +1,4 @@ -lookup_rdf("a", "../../../../../maps/hcrt.ttl", target: "http://www.w3.org/2004/02/skos/core#prefLabel", target_language: "en", select: "object") +lookup_rdf("a", "../../../../../maps/hcrt.ttl", target: "http://www.w3.org/2004/02/skos/core#prefLabel", select_language: "en") # Cant define specific lookup-match fields, would expect something like this: -# lookup_rdf("a", "./hcrt.ttl", match="http://www.w3.org/2004/02/skos/core#prefLabel", match_language: "de", target: "http://www.w3.org/2004/02/skos/core#prefLabel", target_language: "en") +# lookup_rdf("a", "./hcrt.ttl", match="http://www.w3.org/2004/02/skos/core#prefLabel", match_language: "de", target: "http://www.w3.org/2004/02/skos/core#prefLabel", select_language: "en") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfDefinedPropertyToSubject/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfDefinedPropertyToSubject/test.fix index f896e055..4890cd65 100644 --- a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfDefinedPropertyToSubject/test.fix +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfDefinedPropertyToSubject/test.fix @@ -1,4 +1,4 @@ -lookup_rdf('a', '../../../../../maps/hcrt.ttl', target: 'http://www.w3.org/2004/02/skos/core#prefLabel', target_language: 'de', select: 'subject') +lookup_rdf('a', '../../../../../maps/hcrt.ttl', target: 'http://www.w3.org/2004/02/skos/core#prefLabel', select_language: 'de', select: 'subject') # Cant define specific lookup-match fields, would expect something like this: # lookup_rdf("a", "./hcrt.ttl", match="http://www.w3.org/2004/02/skos/core#prefLabel", match_language: "de") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfPropertyToProperty/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfPropertyToProperty/test.fix index e633a4c1..dd18b144 100644 --- a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfPropertyToProperty/test.fix +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfPropertyToProperty/test.fix @@ -1 +1 @@ -lookup_rdf("a", "../../../../../maps/hcrt.ttl", target: "http://www.w3.org/2004/02/skos/core#prefLabel", target_language: 'en') +lookup_rdf("a", "../../../../../maps/hcrt.ttl", target: "http://www.w3.org/2004/02/skos/core#prefLabel", select_language: 'en') diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfSubjectToProperty/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfSubjectToProperty/test.fix index c4a374af..ee40f8c0 100644 --- a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfSubjectToProperty/test.fix +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupRdfSubjectToProperty/test.fix @@ -1,2 +1,2 @@ # Lookup replaces with default value by default. Should be an option. -lookup_rdf("a", "../../../../../maps/hcrt.ttl", target: "http://www.w3.org/2004/02/skos/core#prefLabel", target_language: "de") +lookup_rdf("a", "../../../../../maps/hcrt.ttl", target: "http://www.w3.org/2004/02/skos/core#prefLabel", select_language: "de")