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 09e6d56..8707021 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
@@ -6,6 +6,7 @@ PREFIX onto:
PREFIX ariadneplus:
PREFIX time:
+PREFIX rdf:
CONSTRUCT {
%record aoprop:rdfType "Record" .
%record aoprop:identifier %record .
@@ -101,20 +102,28 @@ where {
graph {
%record aocat:has_language / skos:prefLabel ?language .
%record aocat:has_original_id ?originalId .
+
+
+
+
+
%record aocat:is_part_of ?partOf .
+
%record aocat:has_creator ?creator .
?creator aocat:has_name ?creatorName .
- %record aocat:has_title ?title .
+
+ %record aocat:has_title ?title .
%record aocat:has_type / skos:prefLabel ?resourceType .
%record aocat:has_type ?typeURI .
?typeURI skos:prefLabel ?typeLabel .
- optional {
- %record aocat:is_about ?aboutURI .
- ?aboutURI rdfs:label ?aboutLabel .
- }
+
+
+
optional {
?creator aocat:has_email ?creatorEmail .
}
+
+
optional {
%record aocat:has_description ?description .
}
@@ -130,35 +139,63 @@ where {
optional {
%record aocat:has_visual_component ?visualComponent .
}
+
+
}
+
+
+ optional {
+ graph {
+ select ?aboutURI ?aboutLabel
+ where {
+
+ %record aocat:is_about ?aboutURI .
+ ?aboutURI rdfs:label ?aboutLabel .
+ }
+ limit 10
+ }
+ }
+
+
+
optional {
graph {
- %record aocat:has_temporal_coverage ?temporalNative .
- ?temporalNative aocat:has_native_period ?nativeLabel .
- ?nativeLabel skos:prefLabel ?temporalNativePeriodName .
- optional {
- ?temporalNative aocat:from ?temporalNativeFrom .
- ?temporalNative aocat:until ?temporalNativeUntil .
+ select distinct ?temporalNative ?nativeLabel ?temporalNativePeriodName ?temporalNativeFrom ?temporalNativeUntil
+ where {
+ %record aocat:has_temporal_coverage ?temporalNative .
+ ?temporalNative aocat:has_native_period ?nativeLabel .
+ ?nativeLabel skos:prefLabel ?origTemporalNativePeriodName .
+ optional {
+ ?temporalNative aocat:from ?temporalNativeFrom .
+ ?temporalNative aocat:until ?temporalNativeUntil .
+ }
+ BIND(lcase(?origTemporalNativePeriodName) as ?temporalNativePeriodName)
}
}
}
+
optional {
graph {
+ select distinct ?temporal ?temporalPeriodName ?temporalFrom ?temporalUntil
+ where {
%record aocat:has_temporal_coverage ?temporal .
- }
- graph {
- ?temporal aocat:has_period ?label .
- graph {
- ?label skos:prefLabel ?temporalPeriodName .
- }
- optional {
- ?temporal aocat:from ?temporalFrom .
- ?temporal aocat:until ?temporalUntil .
- }
- }
+ graph {
+ ?temporal aocat:has_period ?label .
+ graph {
+
+ ?label skos:prefLabel ?origTemporalPeriodName .
+ }
+ optional {
+ ?temporal aocat:from ?temporalFrom .
+ ?temporal aocat:until ?temporalUntil .
+ }
+ }
+ BIND(lcase(?origTemporalPeriodName) as ?temporalPeriodName)
+ }
+ }
}
graph {
@@ -221,7 +258,8 @@ where {
}
}
- graph {
+
+ graph {
{
select *
where {
@@ -254,26 +292,29 @@ where {
}
}
+
graph {
{
- select *
+ select distinct ?nativeSubject ?nativeSubjectPrefLabel
where {
%record aocat:has_native_subject ?nativeSubject .
- ?nativeSubject skos:prefLabel ?nativeSubjectPrefLabel .
+ ?nativeSubject skos:prefLabel ?origNativeSubjectPrefLabel .
+ BIND(lcase(?origNativeSubjectPrefLabel) as ?nativeSubjectPrefLabel)
}
}
}
graph {
{
- select *
+ select distinct ?derivedSubject ?derivedSubjectPrefLabel
where {
optional {
%record aocat:has_derived_subject ?derivedSubject .
graph {
- ?derivedSubject skos:prefLabel ?derivedSubjectPrefLabel .
+ ?derivedSubject skos:prefLabel ?origDerivedSubjectPrefLabel .
}
}
+ BIND(lcase(?origDerivedSubjectPrefLabel) as ?derivedSubjectPrefLabel)
}
}
}
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 beee138..df9a7aa 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
@@ -331,6 +331,16 @@ public class GraphDbReaderAndESIndexTest {
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
+ @Test
+// @Ignore
+ public void uploadADSGreyLiteratureOver300TriplesTest() throws Exception {
+ boolean isRecord = true;
+ String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/35AEC455-6CB5-31BB-B73E-30959FF3C4FE";
+ String datasource = "ads";
+ String collectionId = "1093";
+ 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();