diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_record_data_template.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_record_data_template.sparql index b867d9f..08626b2 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_record_data_template.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_record_data_template.sparql @@ -49,6 +49,8 @@ CONSTRUCT { ?temporal aoprop:uri ?temporal . %record aoprop:uri ?temporalNative . ?temporalNative aoprop:nativePeriodName ?temporalNativePeriodName . +?temporalNative aoprop:from ?temporalNativeFrom . +?temporalNative aoprop:until ?temporalNativeUntil . %record aoprop:archeologicalResourceType ?archeologicalResourceType . ?archeologicalResourceType aoprop:name ?archeologicalResourceTypeName . %record aoprop:resourceType ?resourceType . @@ -100,6 +102,10 @@ where { optional { %record aocat:has_temporal_coverage ?temporalNative . ?temporalNative aocat:has_native_period / skos:prefLabel ?temporalNativePeriodName . + optional { + ?temporalNative aocat:from ?temporalNativeFrom . + ?temporalNative aocat:until ?temporalNativeUntil . + } } optional { %record aocat:has_temporal_coverage ?temporal . 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 b4b09b7..a0ead61 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 @@ -52,6 +52,7 @@ public class GraphDbReaderAndESIndexTest { } @Test + @Ignore public void uploadAMCRSiteTest() throws Exception { boolean isRecord = true; String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/AMCR/3C7EC936-A7CA-3720-B3DC-413A25754FD4"; @@ -70,6 +71,25 @@ public class GraphDbReaderAndESIndexTest { readAndIndexTest(isRecord, recordId, datasource, collectionId); } + @Test + @Ignore + public void uploadADSRecordWithNativeFromUntilTest() throws Exception { + boolean isRecord = true; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/3C3C7A86-FF09-3431-95B1-B9A4AA8293AF"; + String datasource = "ads"; + String collectionId = "1970"; + readAndIndexTest(isRecord, recordId, datasource, collectionId); + } + + @Test + public void uploadADSRecordWithoutNativeFromUntilTest() throws Exception { + boolean isRecord = true; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/DF5F27D3-C877-3F23-9EAA-3776362363AA"; + String datasource = "ads"; + String collectionId = "304"; + readAndIndexTest(isRecord, recordId, datasource, collectionId); + } + private void readAndIndexTest(boolean isRecord, String recordId, String datasource, String collectionId) throws Exception { final ClassPathResource resource = new ClassPathResource("application.properties"); Properties appProps = new Properties();