from/until retrieved also for native period

This commit is contained in:
Enrico Ottonello 2021-03-02 17:13:33 +01:00
parent 7358dd1f1f
commit 61f0d6877d
2 changed files with 26 additions and 0 deletions

View File

@ -49,6 +49,8 @@ CONSTRUCT {
?temporal aoprop:uri ?temporal .
%record aoprop:uri ?temporalNative .
?temporalNative aoprop:nativePeriodName ?temporalNativePeriodName .
?temporalNative aoprop:from ?temporalNativeFrom .
?temporalNative aoprop:until ?temporalNativeUntil .
%record aoprop:archeologicalResourceType ?archeologicalResourceType .
?archeologicalResourceType aoprop:name ?archeologicalResourceTypeName .
%record aoprop:resourceType ?resourceType .
@ -100,6 +102,10 @@ where {
optional {
%record aocat:has_temporal_coverage ?temporalNative .
?temporalNative aocat:has_native_period / skos:prefLabel ?temporalNativePeriodName .
optional {
?temporalNative aocat:from ?temporalNativeFrom .
?temporalNative aocat:until ?temporalNativeUntil .
}
}
optional {
%record aocat:has_temporal_coverage ?temporal .

View File

@ -52,6 +52,7 @@ public class GraphDbReaderAndESIndexTest {
}
@Test
@Ignore
public void uploadAMCRSiteTest() throws Exception {
boolean isRecord = true;
String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/AMCR/3C7EC936-A7CA-3720-B3DC-413A25754FD4";
@ -70,6 +71,25 @@ public class GraphDbReaderAndESIndexTest {
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
@Test
@Ignore
public void uploadADSRecordWithNativeFromUntilTest() throws Exception {
boolean isRecord = true;
String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/3C3C7A86-FF09-3431-95B1-B9A4AA8293AF";
String datasource = "ads";
String collectionId = "1970";
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
@Test
public void uploadADSRecordWithoutNativeFromUntilTest() throws Exception {
boolean isRecord = true;
String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/DF5F27D3-C877-3F23-9EAA-3776362363AA";
String datasource = "ads";
String collectionId = "304";
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();