case fix for native and derived subject
This commit is contained in:
parent
905226390c
commit
25a6433809
|
@ -5,6 +5,7 @@ PREFIX aoprop: <https://www.ariadne-infrastructure.eu/property/>
|
|||
PREFIX onto: <http://www.ontotext.com/>
|
||||
PREFIX ariadneplus: <https://ariadne-infrastructure.eu/aocat/>
|
||||
PREFIX time: <http://www.w3.org/2006/time#>
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
|
||||
CONSTRUCT {
|
||||
%record aoprop:rdfType "Collection" .
|
||||
|
@ -57,6 +58,10 @@ CONSTRUCT {
|
|||
?spatialRegionBox aoprop:boxMaxLon ?spatialLocationBBMaxLon .
|
||||
?spatialRegionBox aoprop:boxMinLat ?spatialLocationBBMinLat .
|
||||
?spatialRegionBox aoprop:boxMinLon ?spatialLocationBBMinLon .
|
||||
%record aoprop:spatialRegionPolygon ?spatialRegionPolygon .
|
||||
?spatialRegionPolygon aoprop:geoPoint ?geoPoint .
|
||||
?geoPoint aoprop:lat ?lat .
|
||||
?geoPoint aoprop:lon ?lon .
|
||||
%record aoprop:spatialRegionWKTPolygon ?spatialRegionWKTPolygon .
|
||||
?spatialRegionWKTPolygon aoprop:wkt ?wkt .
|
||||
%record aoprop:temporal ?temporal .
|
||||
|
@ -103,15 +108,7 @@ where {
|
|||
%record aocat:has_type / skos:prefLabel ?resourceType .
|
||||
%record aocat:has_type ?typeURI .
|
||||
?typeURI skos:prefLabel ?typeLabel .
|
||||
optional {
|
||||
%record aocat:is_about ?aboutURI .
|
||||
?aboutURI rdfs:label ?aboutLabel .
|
||||
}
|
||||
optional {
|
||||
%record aocat:has_native_subject ?nativeSubject .
|
||||
?nativeSubject skos:prefLabel ?nativeSubjectPrefLabel .
|
||||
}
|
||||
optional {
|
||||
?creator aocat:has_email ?creatorEmail .
|
||||
}
|
||||
optional {
|
||||
|
@ -125,46 +122,54 @@ where {
|
|||
}
|
||||
}
|
||||
|
||||
graph <https://ariadne-infrastructure.eu/ariadneplus::%datasource::aatplus> {
|
||||
optional {
|
||||
%record aocat:has_derived_subject ?derivedSubject .
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::aat> {
|
||||
?derivedSubject skos:prefLabel ?derivedSubjectPrefLabel .
|
||||
}
|
||||
optional {
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||
select ?aboutURI ?aboutLabel
|
||||
where {
|
||||
|
||||
%record aocat:is_about ?aboutURI .
|
||||
?aboutURI rdfs:label ?aboutLabel .
|
||||
}
|
||||
limit 10
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
select *
|
||||
where {
|
||||
optional {
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||
optional {
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||
select distinct ?temporalNative ?nativeLabel ?temporalNativePeriodName ?temporalNativeFrom ?temporalNativeUntil
|
||||
where {
|
||||
%record aocat:has_temporal_coverage ?temporalNative .
|
||||
?temporalNative aocat:has_native_period / skos:prefLabel ?temporalNativePeriodName .
|
||||
?temporalNative aocat:has_native_period ?nativeLabel .
|
||||
?nativeLabel skos:prefLabel ?origTemporalNativePeriodName .
|
||||
optional {
|
||||
?temporalNative aocat:from ?temporalNativeFrom .
|
||||
?temporalNative aocat:until ?temporalNativeUntil .
|
||||
}
|
||||
BIND(lcase(?origTemporalNativePeriodName) as ?temporalNativePeriodName)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
optional {
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||
%record aocat:has_temporal_coverage ?temporal .
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||
select distinct ?temporal ?temporalPeriodName ?temporalFrom ?temporalUntil
|
||||
where {
|
||||
%record aocat:has_temporal_coverage ?temporal .
|
||||
graph <https://ariadne-infrastructure.eu/ariadneplus::%datasource::periodoplus> {
|
||||
?temporal aocat:has_period ?label .
|
||||
graph <https://ariadne-infrastructure.eu/ariadneplus::%datasource::periodo> {
|
||||
|
||||
?label skos:prefLabel ?origTemporalPeriodName .
|
||||
}
|
||||
optional {
|
||||
?temporal aocat:from ?temporalFrom .
|
||||
?temporal aocat:until ?temporalUntil .
|
||||
}
|
||||
}
|
||||
graph <https://ariadne-infrastructure.eu/ariadneplus::%datasource::periodoplus> {
|
||||
?temporal aocat:has_period ?label .
|
||||
graph <https://ariadne-infrastructure.eu/ariadneplus::%datasource::periodo> {
|
||||
?label skos:prefLabel ?temporalPeriodName .
|
||||
}
|
||||
optional {
|
||||
?temporal aocat:from ?temporalFrom .
|
||||
?temporal aocat:until ?temporalUntil .
|
||||
}
|
||||
}
|
||||
BIND(lcase(?origTemporalPeriodName) as ?temporalPeriodName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||
{
|
||||
|
@ -246,6 +251,12 @@ where {
|
|||
aocat:has_bounding_box_min_lat ?spatialLocationBBMinLat ;
|
||||
aocat:has_bounding_box_min_lon ?spatialLocationBBMinLon ;
|
||||
}
|
||||
optional {
|
||||
%record aocat:has_spatial_coverage ?spatialRegionPolygon .
|
||||
?spatialRegionPolygon aocat:has_polygonal_representation ?geoPoint .
|
||||
?geoPoint aocat:has_latitude ?lat .
|
||||
?geoPoint aocat:has_longitude ?lon .
|
||||
}
|
||||
optional {
|
||||
%record aocat:has_spatial_coverage ?spatialRegionWKTPolygon .
|
||||
?spatialRegionWKTPolygon rdf:type aocat:AO_Spatial_Region_Polygon .
|
||||
|
@ -254,5 +265,34 @@ where {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||
{
|
||||
select distinct ?nativeSubject ?nativeSubjectPrefLabel
|
||||
where {
|
||||
optional {
|
||||
%record aocat:has_native_subject ?nativeSubject .
|
||||
?nativeSubject skos:prefLabel ?origNativeSubjectPrefLabel .
|
||||
}
|
||||
BIND(lcase(?origNativeSubjectPrefLabel) as ?nativeSubjectPrefLabel)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
graph <https://ariadne-infrastructure.eu/ariadneplus::%datasource::aatplus> {
|
||||
{
|
||||
select distinct ?derivedSubject ?derivedSubjectPrefLabel
|
||||
where {
|
||||
optional {
|
||||
%record aocat:has_derived_subject ?derivedSubject .
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::aat> {
|
||||
?derivedSubject skos:prefLabel ?origDerivedSubjectPrefLabel .
|
||||
}
|
||||
}
|
||||
BIND(lcase(?origDerivedSubjectPrefLabel) as ?derivedSubjectPrefLabel)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BIND (lang(?derivedSubjectPrefLabel) as ?aatSubjectsLang)
|
||||
}
|
|
@ -5,8 +5,8 @@ PREFIX aoprop: <https://www.ariadne-infrastructure.eu/property/>
|
|||
PREFIX onto: <http://www.ontotext.com/>
|
||||
PREFIX ariadneplus: <https://ariadne-infrastructure.eu/aocat/>
|
||||
PREFIX time: <http://www.w3.org/2006/time#>
|
||||
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
|
||||
CONSTRUCT {
|
||||
%record aoprop:rdfType "Record" .
|
||||
%record aoprop:identifier %record .
|
||||
|
@ -102,13 +102,7 @@ where {
|
|||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||
%record aocat:has_language / skos:prefLabel ?language .
|
||||
%record aocat:has_original_id ?originalId .
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%record aocat:is_part_of ?partOf .
|
||||
|
||||
%record aocat:has_creator ?creator .
|
||||
?creator aocat:has_name ?creatorName .
|
||||
|
||||
|
@ -116,14 +110,9 @@ where {
|
|||
%record aocat:has_type / skos:prefLabel ?resourceType .
|
||||
%record aocat:has_type ?typeURI .
|
||||
?typeURI skos:prefLabel ?typeLabel .
|
||||
|
||||
|
||||
|
||||
optional {
|
||||
?creator aocat:has_email ?creatorEmail .
|
||||
}
|
||||
|
||||
|
||||
optional {
|
||||
%record aocat:has_description ?description .
|
||||
}
|
||||
|
@ -139,12 +128,8 @@ where {
|
|||
optional {
|
||||
%record aocat:has_visual_component ?visualComponent .
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
optional {
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||
select ?aboutURI ?aboutLabel
|
||||
|
@ -157,8 +142,6 @@ where {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
optional {
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||
select distinct ?temporalNative ?nativeLabel ?temporalNativePeriodName ?temporalNativeFrom ?temporalNativeUntil
|
||||
|
@ -175,8 +158,6 @@ where {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
optional {
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||
select distinct ?temporal ?temporalPeriodName ?temporalFrom ?temporalUntil
|
||||
|
@ -195,7 +176,7 @@ where {
|
|||
}
|
||||
BIND(lcase(?origTemporalPeriodName) as ?temporalPeriodName)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||
|
@ -258,7 +239,6 @@ where {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||
{
|
||||
select *
|
||||
|
@ -292,7 +272,6 @@ where {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||
{
|
||||
select distinct ?nativeSubject ?nativeSubjectPrefLabel
|
||||
|
|
|
@ -332,7 +332,7 @@ public class GraphDbReaderAndESIndexTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
// @Ignore
|
||||
@Ignore
|
||||
public void uploadADSGreyLiteratureOver300TriplesTest() throws Exception {
|
||||
boolean isRecord = true;
|
||||
String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/35AEC455-6CB5-31BB-B73E-30959FF3C4FE";
|
||||
|
@ -341,6 +341,16 @@ public class GraphDbReaderAndESIndexTest {
|
|||
readAndIndexTest(isRecord, recordId, datasource, collectionId);
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Ignore
|
||||
public void uploadDimeBoundingBoxTest() throws Exception {
|
||||
boolean isRecord = true;
|
||||
String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/F9398BD5-DECB-3FF5-8077-D96893D0D0C6";
|
||||
String datasource = ":aarhusdime";
|
||||
String collectionId = "test";
|
||||
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();
|
||||
|
|
Loading…
Reference in New Issue