diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1.sparql index cc591f3..edcfcdf 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1.sparql @@ -185,7 +185,7 @@ WHERE { ?native_period skos:prefLabel ?native_label . GRAPH { ?periodO skos:altLabel ?lowercase_native_label . - ?periodO skos:inScheme . + ?periodO skos:inScheme . ?periodO time:intervalStartedBy ?intervalStartedBy . ?intervalStartedBy skos:prefLabel ?temporalFrom . ?periodO time:intervalFinishedBy ?intervalFinishedBy . @@ -193,4 +193,46 @@ WHERE { BIND(ucase(?lowercase_native_label) as ?native_label) } } - }; \ No newline at end of file + }; + + PREFIX aocat: + PREFIX rdf: + PREFIX rdfs: + INSERT { + GRAPH { + ?c aocat:has_name ?l . + } + } + WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_owner ?c . + ?c rdfs:label ?l . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_owner ?c . + ?c aocat:has_name ?n . + } + } + }; + + PREFIX aocat: + PREFIX rdf: + PREFIX rdfs: + INSERT { + GRAPH { + ?c aocat:has_name ?l . + } + } + WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_publisher ?c . + ?c rdfs:label ?l . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_publisher ?c . + ?c aocat:has_name ?n . + } + } + }; \ 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 31762ad..32023ad 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 @@ -393,6 +393,15 @@ public class GraphDbReaderAndESIndexTest { readAndIndexTest(isRecord, recordId, datasource, collectionId); } + @Test + public void uploadAdsScotlandAATTest() throws Exception { + boolean isRecord = true; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/1039819E-583F-3856-8463-BB58523DB0F9"; + String datasource = "ads"; + String collectionId = "1"; + 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();