Compare commits

...

2 Commits

Author SHA1 Message Date
Enrico Ottonello 44fb0bb3c1 test for INP 2022-07-18 11:20:28 +02:00
Enrico Ottonello a10ad74699 INP - added from/until range from native period 2022-07-18 11:19:51 +02:00
2 changed files with 39 additions and 7 deletions

View File

@ -143,17 +143,40 @@ PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
?derivedSubject skos:prefLabel ?label .
};
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX time: <http://www.w3.org/2006/time#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::inp::periodoplus> {
?temporal aocat:has_period ?native_period .
?temporal aocat:from ?from .
?temporal aocat:until ?until .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::inp::sites> {
?temporal aocat:has_native_period ?native_period .
?native_period rdfs:label|skos:prefLabel ?native_label .
?temporal aocat:from ?from .
?temporal aocat:until ?until .
}
};
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX time: <http://www.w3.org/2006/time#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::inp::periodoplus> {
?temporal aocat:has_period ?periodO .
}
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::inp::periodo> {
?native_period skos:prefLabel ?native_label .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::inp::sites> {
?temporal aocat:has_period ?periodO .
}
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::inp::sites> {
?temporal aocat:has_native_period ?native_period .
?native_period rdfs:label|skos:prefLabel ?native_label .
?temporal aocat:from ?from .
?temporal aocat:until ?until .
}
};

View File

@ -418,6 +418,15 @@ public class GraphDbReaderAndESIndexTest {
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
@Test
public void uploadINPTest() throws Exception {
boolean isRecord = true;
String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/INPRAN/99C2A8A2-32A0-344D-9F41-FD8E7B2C21E3";
String datasource = "inp";
String collectionId = "sites";
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();