diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/NARA/ordered_sparql_insert_nara.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/NARA/ordered_sparql_insert_nara.sparql
index 0279884..552334b 100644
--- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/NARA/ordered_sparql_insert_nara.sparql
+++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/NARA/ordered_sparql_insert_nara.sparql
@@ -218,4 +218,33 @@ WHERE {
?spatialRegion aocat:has_place_name ?placeName .
}
}
+};
+
+PREFIX aocat:
+PREFIX skos:
+PREFIX rdf:
+PREFIX rdfs:
+PREFIX owl:
+PREFIX ariadneplus:
+PREFIX time:
+PREFIX periodo:
+INSERT {
+ GRAPH {
+ ?temporal aocat:has_period ?periodO .
+ ?temporal aocat:from ?temporalFrom .
+ ?temporal aocat:until ?temporalUntil .
+ }
+}
+WHERE {
+GRAPH {
+ ?temporal aocat:has_native_period ?native_period .
+ ?native_period skos:prefLabel ?native_label .
+ optional {
+ GRAPH {
+ ?periodO skos:altLabel ?native_label .
+ ?periodO time:intervalStartedBy / time:hasDateTimeDescription / periodo:earliestYear ?temporalFrom .
+ ?periodO time:intervalFinishedBy / time:hasDateTimeDescription / periodo:latestYear ?temporalUntil .
+ }
+ }
+ }
};
\ 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 bbeea48..56afa53 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
@@ -221,16 +221,6 @@ public class GraphDbReaderAndESIndexTest {
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
- @Test
-// @Ignore
- public void uploadNaraTest() throws Exception {
- boolean isRecord = true;
- String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/145E8675-8188-3650-9B98-222CA3C04EFA";
- String datasource = "nara";
- String collectionId = "fieldworkreport";
- readAndIndexTest(isRecord, recordId, datasource, collectionId);
- }
-
@Test
// @Ignore
public void uploadDansClosedAccessTest() throws Exception {
@@ -271,6 +261,16 @@ public class GraphDbReaderAndESIndexTest {
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
+ @Test
+// @Ignore
+ public void uploadNaraTest() throws Exception {
+ boolean isRecord = true;
+ String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/0D7F5840-CE59-35F4-9810-2094E8778451";
+ String datasource = "nara";
+ String collectionId = "fieldworkreport";
+ 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();