diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/reader/utils/ESUtils.java b/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/reader/utils/ESUtils.java
index d28524d..60bd239 100644
--- a/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/reader/utils/ESUtils.java
+++ b/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/reader/utils/ESUtils.java
@@ -14,6 +14,7 @@ import java.util.Locale;
public class ESUtils {
private static DateTimeFormatter originalRecordDateFormatter = DateTimeFormatter.ofPattern("dd MMM yyyy");
private static DateTimeFormatter elasticSearchDateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+ private static DateTimeFormatter fastCatDateFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy");
private static ZoneId preferredZone = ZoneId.of("Europe/London");
private static DateTimeFormatter BST_FORMATTER = new DateTimeFormatterBuilder()
.appendPattern("EEE MMM dd HH:mm:ss ")
@@ -43,7 +44,12 @@ public class ESUtils {
try {
return parseBST(originalDate);
} catch (Exception e3) {
- return "0000";
+ try {
+ LocalDate parsedDate = LocalDate.parse(originalDate, fastCatDateFormatter);
+ return parsedDate.format(elasticSearchDateFormatter);
+ } catch (Exception e4) {
+ return "0000";
+ }
}
}
}
diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/IAVP/ordered_sparql_insert_IAVP.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/IAVP/ordered_sparql_insert_IAVP.sparql
index b82d6a0..46cb28a 100644
--- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/IAVP/ordered_sparql_insert_IAVP.sparql
+++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/IAVP/ordered_sparql_insert_IAVP.sparql
@@ -40,6 +40,27 @@ WHERE {
?lang skos:prefLabel ?langL
};
+PREFIX aocat:
+PREFIX skos:
+PREFIX rdf:
+PREFIX rdfs:
+INSERT {
+ GRAPH {
+ ?s aocat:has_creator .
+ rdf:type .
+ rdfs:label "Not provided" .
+ aocat:has_name "Not provided" .
+ }
+}
+WHERE {
+ GRAPH {
+ ?s rdf:type aocat:AO_Individual_Data_Resource .
+ MINUS {
+ ?s rdf:type aocat:AO_Individual_Data_Resource .
+ ?s aocat:has_creator ?creator .
+ }
+ }
+};
PREFIX aocat:
PREFIX skos:
@@ -105,4 +126,25 @@ PREFIX skos:
?temporal aocat:from ?from .
?temporal aocat:until ?until .
}
+ };
+
+ PREFIX aocat:
+ PREFIX rdf:
+ PREFIX rdfs:
+ PREFIX skos:
+ INSERT {
+ GRAPH {
+ ?s aocat:has_type .
+ rdf:type .
+ skos:prefLabel "provided record"
+ }
+ }
+ WHERE {
+ GRAPH {
+ ?s rdf:type aocat:AO_Individual_Data_Resource .
+ MINUS {
+ ?s rdf:type aocat:AO_Individual_Data_Resource .
+ ?s aocat:has_type ?t .
+ }
+ }
};
\ No newline at end of file
diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_collection_data_template.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_collection_data_template.sparql
index fe2f608..cbfadbf 100644
--- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_collection_data_template.sparql
+++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_collection_data_template.sparql
@@ -148,7 +148,7 @@ where {
where {
%record aocat:has_temporal_coverage ?temporalNative .
?temporalNative aocat:has_native_period ?nativeLabel .
- ?nativeLabel skos:prefLabel ?origTemporalNativePeriodName .
+ ?nativeLabel skos:prefLabel|rdfs:label ?origTemporalNativePeriodName .
optional {
?temporalNative aocat:from ?temporalNativeFrom .
?temporalNative aocat:until ?temporalNativeUntil .
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 2f53d84..bfeff28 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
@@ -391,6 +391,16 @@ public class GraphDbReaderAndESIndexTest {
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
+ @Test
+// @Ignore
+ public void uploadIAVPFastCatCollectionWasCreatedTest() throws Exception {
+ boolean isRecord = false;
+ String recordId = "https://ariadne-infrastructure.eu/aocat/Collection/IAVP/E60F992F-C34D-39B5-99AD-406BA27B090B";
+ String datasource = "iavp";
+ String collectionId = "collection";
+ 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();