test for ads 1

This commit is contained in:
Enrico Ottonello 2022-06-16 11:12:15 +02:00
parent ae13edb870
commit d0f763f33e
2 changed files with 53 additions and 2 deletions

View File

@ -185,7 +185,7 @@ WHERE {
?native_period skos:prefLabel ?native_label .
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::ads::periodo> {
?periodO skos:altLabel ?lowercase_native_label .
?periodO skos:inScheme <http://n2t.net/ark:/99152/p0kh9ds> .
?periodO skos:inScheme <http://n2t.net/ark:/99152/p0xxt6t> .
?periodO time:intervalStartedBy ?intervalStartedBy .
?intervalStartedBy skos:prefLabel ?temporalFrom .
?periodO time:intervalFinishedBy ?intervalFinishedBy .
@ -194,3 +194,45 @@ WHERE {
}
}
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::1> {
?c aocat:has_name ?l .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::1> {
?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: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::1> {
?c aocat:has_name ?l .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::1> {
?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 .
}
}
};

View File

@ -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();