diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt b/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt
index fd1b681..8bb5843 100644
--- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt
+++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt
@@ -1,4 +1,3 @@
-
PREFIX aocat:
PREFIX rdfs:
PREFIX skos:
@@ -12,7 +11,7 @@ CONSTRUCT {
?record aoprop:originalId ?originalId .
?record aoprop:issued ?issued .
?record aoprop:modified ?modified .
-?record aoprop:partOf ?collection .
+?record aoprop:partOf ?partOf .
?record aoprop:creator ?creator .
?creator aoprop:name ?creatorName .
?creator aoprop:email ?creatorEmail .
@@ -58,76 +57,50 @@ CONSTRUCT {
?record aoprop:description ?description .
?record aoprop:language ?language .
}
-
from
-from
-
+from
where {
?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 .
+ ?record aocat:has_title ?title .
optional {
- {
- ?record aocat:has_native_subject ?nativeSubject .
+ ?creator aocat:has_email ?creatorEmail .
+ }
+ optional {
+ ?collection aocat:has_type / skos:prefLabel ?type .
+ }
+ optional {
+ ?record aocat:has_native_subject ?nativeSubject .
?nativeSubject skos:prefLabel ?nativeSubjectPrefLabel .
optional {
- {
?nativeSubject skos:exactMatch ?aatSubjectsId .
- }
- union
- {
+ }
+ optional {
?nativeSubject skos:closeMatch ?aatSubjectsId .
- }
}
- }
- union
- {
- ?record aocat:has_creator ?creator .
- ?creator aocat:has_name ?creatorName .
- }
- union
- {
- ?record aocat:has_creator ?creator .
- ?creator aocat:has_email ?creatorEmail .
- }
- union
- {
- ?record aocat:has_access_rights ?accessRights .
- }
- union
- {
+ }
+ optional {
?record aocat:has_description ?description .
- }
- union
- {
+ }
+ optional {
?record aocat:has_access_policy / rdfs:label ?accessPolicy .
- }
- union
- {
- ?record aocat:has_landing_page / rdfs:label ?landingPage .
- }
- union
- {
- ?record aocat:has_temporal_coverage ?temporal .
- }
- union
- {
- ?record aocat:has_temporal_coverage ?temporal .
+ }
+ optional {
+ ?record aocat:has_landing_page / rdfs:label ?landingPage .
+ }
+ optional {
+ ?record aocat:has_temporal_coverage ?temporal .
+ }
+ optional {
+ ?record aocat:has_temporal_coverage ?temporal .
?temporal aocat:has_period / skos:prefLabel ?temporalPeriodName .
+ optional {
+ ?temporal aocat:from ?temporalFrom .
+ ?temporal aocat:until ?temporalUntil .
}
- union
- {
- ?record aocat:has_temporal_coverage ?temporal .
- ?temporal aocat:from ?temporalFrom .
- }
- union
- {
- ?record aocat:has_temporal_coverage ?temporal .
- ?temporal aocat:until ?temporalUntil .
- }
- union
- {
- ?record aocat:has_title ?title .
- }
}
{
select *
@@ -141,70 +114,44 @@ where {
?legalResponsible aocat:has_name ?legalResponsibleName .
?collection aocat:has_owner ?owner .
?owner aocat:has_name ?ownerName .
+ ?collection aocat:has_publisher ?publisher .
+ ?publisher aocat:has_name ?publisherName .
+ ?collection aocat:has_access_rights ?accessRights .
+ ?collection aocat:has_ARIADNE_subject ?archeologicalResourceType .
+ ?archeologicalResourceType skos:prefLabel ?archeologicalResourceTypeName .
optional {
- {
- ?collection aocat:has_contributor / aocat:has_email ?contributorEmail .
- }
- union
- {
- ?collection aocat:has_responsible / aocat:has_email ?legalResponsibleEmail .
- }
- union
- {
- ?collection aocat:has_owner / aocat:has_email ?ownerEmail .
- }
- union
- {
- ?collection aocat:has_publisher ?publisher .
- ?publisher aocat:has_name ?publisherName .
- optional {
- ?publisher aocat:has_email ?publisherEmail .
- }
- }
- union
- {
- ?collection aocat:has_ARIADNE_subject ?archeologicalResourceType .
- ?archeologicalResourceType skos:prefLabel ?archeologicalResourceTypeName .
- }
- union
- {
- ?collection aocat:has_type / skos:prefLabel ?type .
- }
- union
- {
- ?collection aocat:has_access_rights ?accessRights .
- }
+ ?contributor aocat:has_email ?contributorEmail .
}
- }
- }
- union
+ optional {
+ ?legalResponsible aocat:has_email ?legalResponsibleEmail .
+ }
+ optional {
+ ?owner aocat:has_email ?ownerEmail .
+ }
+ optional {
+ ?publisher aocat:has_email ?publisherEmail .
+ }
+ }
+ }
{
select *
where {
+ ?record aocat:has_spatial_coverage ?spatial .
+ ?spatial aocat:has_place_name ?spatialPlaceName .
+ optional {
+ ?spatial aocat:has_coordinate_system ?spatialCoordinateSystem .
+ }
optional {
- {
- ?record aocat:has_spatial_coverage ?spatial .
- ?spatial aocat:has_place_name ?spatialPlaceName .
- optional {
- ?spatial aocat:has_coordinate_system ?spatialCoordinateSystem .
- }
- }
- union
- {
- ?record aocat:has_spatial_coverage ?spatial .
?spatial aocat:has_latitude ?spatialLocationLat ;
aocat:has_longitude ?spatialLocationLon .
BIND(uri(concat('https://www.ariadne-infrastructure.eu/property/location/', md5(concat(str(?spatialLocationLat), str(?spatialLocationLon))))) as ?location)
- }
- union
- {
- ?record aocat:has_spatial_coverage ?spatial .
+ }
+ optional {
?spatial aocat:has_bounding_box_max_lat ?spatialLocationBBMaxLat ;
aocat:has_bounding_box_max_lon ?spatialLocationBBMaxLon ;
aocat:has_bounding_box_min_lat ?spatialLocationBBMinLat ;
aocat:has_bounding_box_min_lon ?spatialLocationBBMinLon ;
BIND(uri(concat('https://www.ariadne-infrastructure.eu/property/location/', md5(concat(str(?spatialLocationBBMaxLat), str(?spatialLocationBBMaxLon), str(?spatialLocationBBMinLat), str(?spatialLocationBBMinLon))))) as ?boxlocation)
- }
}
}
}