initial enrichment for conicet

This commit is contained in:
Enrico Ottonello 2021-09-06 13:40:31 +02:00
parent e106393e07
commit 5f4e1e2819
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,41 @@
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
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::conicet::CollectionInfo> {
?s aocat:was_issued ?created_on .
?s aocat:was_modified ?created_on .
}
}
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::conicet::CollectionInfo>
WHERE {
?s rdf:type aocat:AO_Collection .
?s aocat:was_created_on ?created_on .
MINUS {
?s rdf:type aocat:AO_Collection .
?s aocat:was_created_on ?created_on .
?s aocat:was_issued ?issued .
?s aocat:was_modified ?modified .
}
};
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 skos: <http://www.w3.org/2004/02/skos/core#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::conicet::CollectionInfo> {
?s aocat:has_type <https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/collection> .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/collection> rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Concept> .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/collection> skos:prefLabel "collection"
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::conicet::CollectionInfo> {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
MINUS {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
?s aocat:has_type ?t .
}
}
};

View File

@ -261,6 +261,16 @@ public class GraphDbReaderAndESIndexTest {
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
@Test
// @Ignore
public void uploadConicetCollectionTest() throws Exception {
boolean isRecord = false;
String recordId = "https://ariadne-infrastructure.eu/aocat/Collection/IDACOR%20%28CONICET%2FUNC%29/8B238475-2BA7-3036-88C0-968E9A642E64";
String datasource = "conicet";
String collectionId = "CollectionInfo";
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();