aligned temporal data retrieving for collection with working record one

This commit is contained in:
Enrico Ottonello 2021-03-05 12:34:15 +01:00
parent ae6abb9873
commit 725c596213
4 changed files with 28 additions and 13 deletions

View File

@ -70,7 +70,7 @@ class.map.specifications={\
"substring": "no",\
"element_type": "java.lang.String"\
},\
"https://www.ariadne-infrastructure.eu/property/coordinateSystem": {\
"https://www.ariadne-infrastructure.eu/property/spatialCoordinateSystem": {\
"class_field": "CoordinateSystem",\
"substring": "no",\
"element_type": "java.lang.String"\
@ -304,7 +304,7 @@ class.map.specifications={\
"substring": "no",\
"element_type": "java.lang.String"\
},\
"https://www.ariadne-infrastructure.eu/property/uri": {\
"https://www.ariadne-infrastructure.eu/property/temporal": {\
"class_field": "Temporal",\
"substring": "no",\
"external_reference": "AriadneTemporal"\

View File

@ -42,13 +42,15 @@ CONSTRUCT {
?spatialRegionBox aoprop:boxMaxLon ?spatialLocationBBMaxLon .
?spatialRegionBox aoprop:boxMinLat ?spatialLocationBBMinLat .
?spatialRegionBox aoprop:boxMinLon ?spatialLocationBBMinLon .
%record aoprop:uri ?temporal .
%record aoprop:temporal ?temporal .
?temporal aoprop:periodOName ?temporalPeriodName .
?temporal aoprop:from ?temporalFrom .
?temporal aoprop:until ?temporalUntil .
?temporal aoprop:uri ?temporal .
%record aoprop:uri ?temporalNative .
%record aoprop:temporal ?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 .
@ -105,16 +107,20 @@ where {
{
select *
where {
%record aocat:has_temporal_coverage ?temporalCoverage .
optional {
?temporalCoverage aocat:has_native_period ?temporalNative .
?temporalNative skos:prefLabel ?temporalNativePeriodName .
%record aocat:has_temporal_coverage ?temporalNative .
?temporalNative aocat:has_native_period / skos:prefLabel ?temporalNativePeriodName .
optional {
?temporalNative aocat:from ?temporalNativeFrom .
?temporalNative aocat:until ?temporalNativeUntil .
}
}
optional {
?temporalCoverage aocat:has_period ?temporalPeriodO .
%record aocat:has_temporal_coverage ?temporal .
?temporal aocat:has_period / skos:prefLabel ?temporalPeriodName .
optional {
?temporalCoverage aocat:from ?temporalFrom .
?temporalCoverage aocat:until ?temporalUntil .
?temporal aocat:from ?temporalFrom .
?temporal aocat:until ?temporalUntil .
}
}
}

View File

@ -42,12 +42,12 @@ CONSTRUCT {
?spatialRegionBox aoprop:boxMaxLon ?spatialLocationBBMaxLon .
?spatialRegionBox aoprop:boxMinLat ?spatialLocationBBMinLat .
?spatialRegionBox aoprop:boxMinLon ?spatialLocationBBMinLon .
%record aoprop:uri ?temporal .
%record aoprop:temporal ?temporal .
?temporal aoprop:periodOName ?temporalPeriodName .
?temporal aoprop:from ?temporalFrom .
?temporal aoprop:until ?temporalUntil .
?temporal aoprop:uri ?temporal .
%record aoprop:uri ?temporalNative .
%record aoprop:temporal ?temporalNative .
?temporalNative aoprop:nativePeriodName ?temporalNativePeriodName .
?temporalNative aoprop:from ?temporalNativeFrom .
?temporalNative aoprop:until ?temporalNativeUntil .

View File

@ -98,7 +98,16 @@ public class GraphDbReaderAndESIndexTest {
@Test
public void uploadHNMCollectionSpatialTest() throws Exception {
boolean isRecord = false;
String recordId = "https://ariadne-portal-staging.d4science.org/resource/981B4251-FA9C-35E9-8654-57278808145D";
String recordId = "https://ariadne-infrastructure.eu/aocat/Collection/HNM/5A7A4257-EE73-31F9-9F74-BADB371555F5";
String datasource = "hnm";
String collectionId = "hnmad";
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
@Test
public void uploadHNMCollectionTemporalTest() throws Exception {
boolean isRecord = false;
String recordId = "https://ariadne-infrastructure.eu/aocat/Collection/HNM/0F1AF07E-CE63-342C-8E95-11FF1C024BD5";
String datasource = "hnm";
String collectionId = "hnmad";
readAndIndexTest(isRecord, recordId, datasource, collectionId);