diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DAI/ordered_sparql_insert_afe_rgk.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DAI/ordered_sparql_insert_afe_rgk.sparql index b21c415..48eb95c 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DAI/ordered_sparql_insert_afe_rgk.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DAI/ordered_sparql_insert_afe_rgk.sparql @@ -165,4 +165,42 @@ WHERE { ?record aocat:was_issued ?rec_value . ?record aocat:was_modified ?rec_value2 . } -}; \ No newline at end of file +}; + +PREFIX skos: + PREFIX aocat: + PREFIX time: + PREFIX rdfs: + INSERT { + GRAPH { + ?temporal aocat:has_period ?native_period . + ?temporal aocat:from ?from . + ?temporal aocat:until ?until . + } + } + WHERE { + GRAPH { + ?temporal aocat:has_native_period ?native_period . + ?native_period rdfs:label|skos:prefLabel ?native_label . + ?temporal aocat:from ?from . + ?temporal aocat:until ?until . + } + }; + + PREFIX skos: + PREFIX aocat: + PREFIX time: + PREFIX rdfs: + INSERT { + GRAPH { + ?native_period skos:prefLabel ?native_label . + } + } + WHERE { + GRAPH { + ?temporal aocat:has_native_period ?native_period . + ?native_period rdfs:label|skos:prefLabel ?native_label . + ?temporal aocat:from ?from . + ?temporal aocat:until ?until . + } + }; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/test/java/eu/dnetlib/ariadneplus/GraphDbReaderAndESIndexTest.java b/dnet-ariadneplus-graphdb-publisher/test/java/eu/dnetlib/ariadneplus/GraphDbReaderAndESIndexTest.java index b45b3a9..3d872e4 100644 --- a/dnet-ariadneplus-graphdb-publisher/test/java/eu/dnetlib/ariadneplus/GraphDbReaderAndESIndexTest.java +++ b/dnet-ariadneplus-graphdb-publisher/test/java/eu/dnetlib/ariadneplus/GraphDbReaderAndESIndexTest.java @@ -437,6 +437,15 @@ public class GraphDbReaderAndESIndexTest { readAndIndexTest(isRecord, recordId, datasource, collectionId); } + @Test + public void uploadRGKTest() throws Exception { + boolean isRecord = true; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/AFE_RGK/C591D12B-9DBF-397D-8E38-F56C674ECF0E"; + String datasource = "afe_rgk"; + String collectionId = "coins"; + readAndIndexTest(isRecord, recordId, datasource, collectionId); + } + private class CollectionData { String URI_ID; String id;