added periodo matching rule for nara

This commit is contained in:
Enrico Ottonello 2021-09-06 15:42:01 +02:00
parent 5f4e1e2819
commit 239d7afc41
2 changed files with 39 additions and 10 deletions

View File

@ -219,3 +219,32 @@ WHERE {
}
}
};
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#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX ariadneplus: <https://ariadne-infrastructure.eu/aocat/>
PREFIX time: <http://www.w3.org/2006/time#>
PREFIX periodo: <http://n2t.net/ark:/99152/p0v#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::nara::periodoplus> {
?temporal aocat:has_period ?periodO .
?temporal aocat:from ?temporalFrom .
?temporal aocat:until ?temporalUntil .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::nara::fieldworkreport> {
?temporal aocat:has_native_period ?native_period .
?native_period skos:prefLabel ?native_label .
optional {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::nara::periodo> {
?periodO skos:altLabel ?native_label .
?periodO time:intervalStartedBy / time:hasDateTimeDescription / periodo:earliestYear ?temporalFrom .
?periodO time:intervalFinishedBy / time:hasDateTimeDescription / periodo:latestYear ?temporalUntil .
}
}
}
};

View File

@ -221,16 +221,6 @@ public class GraphDbReaderAndESIndexTest {
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
@Test
// @Ignore
public void uploadNaraTest() throws Exception {
boolean isRecord = true;
String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/145E8675-8188-3650-9B98-222CA3C04EFA";
String datasource = "nara";
String collectionId = "fieldworkreport";
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
@Test
// @Ignore
public void uploadDansClosedAccessTest() throws Exception {
@ -271,6 +261,16 @@ public class GraphDbReaderAndESIndexTest {
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
@Test
// @Ignore
public void uploadNaraTest() throws Exception {
boolean isRecord = true;
String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/0D7F5840-CE59-35F4-9810-2094E8778451";
String datasource = "nara";
String collectionId = "fieldworkreport";
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();