matching with aat and fix spatial coverage

This commit is contained in:
Enrico Ottonello 2020-02-27 17:19:12 +01:00
parent 7f93ce6358
commit 7d65ba2a0c
1 changed files with 20 additions and 33 deletions

View File

@ -21,10 +21,10 @@ CONSTRUCT {
?record mine:modified ?modified .
?record mine:nativeSubject ?natSub .
?natSub a mine:NativeSubject .
#?natSub mine:prefLabel ?nativeSbj .
?natSub mine:aat ?aat .
?aat mine:aatLabel ?aatLabel .
?spatial a mine:Spatial .
?natSub mine:prefLabel ?nativeSbj .
?natSub mine:aatId ?aatId .
?natSub mine:aatHeritageData ?aatHeritageData .
#?spatial a mine:Spatial .
?record mine:spatial ?spatial .
?spatial mine:placeName ?spatialPlaceName .
?spatial mine:location ?blocation .
@ -51,30 +51,27 @@ CONSTRUCT {
?record mine:partOf ?collection .
}
from <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::aat>
from <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::collectionId>
from <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::271>
#from onto:explain
where {
#mandatory statements in our model, to be added in all datasources
#mandatory statements in our model, to be added in all datasources
#?record aocat:has_title ?title ;
# aocat:has_access_rights ?accessRights ;
# aocat:has_creator / aocat:has_name ?contributorName ;
# aocat:has_creator / aocat:has_email ?contributorEmail ;
# aocat:has_native_subject / skos:prefLabel ?nativeSbj ;
# aocat:has_original_id ?originalId ;
?record aocat:has_spatial_coverage ?spatial ;
aocat:has_language / skos:prefLabel ?language .
# aocat:has_original_id ?originalId ;
?record aocat:has_language / skos:prefLabel ?language .
optional {
{
?record aocat:has_original_id ?originalId .
}
union
{
?record aocat:has_native_subject ?natSub .
?natSub skos:prefLabel ?nativeSbj .
}
union {
?natSub owl:sameAs ?aat .
?aat skos:prefLabel ?aatLabel
union
{
?record aocat:has_native_subject ?natSub .
?natSub skos:closeMatch ?aatId .
?natSub owl:sameAs ?aatHeritageData .
?natSub skos:prefLabel ?nativeSbj .
}
union
{
@ -106,10 +103,6 @@ where {
}
union
{
?record aocat:is_part_of ?collection .
}
union
{
?record aocat:has_temporal_coverage ?t .
?t aocat:has_period / skos:prefLabel ?temporalPeriodName .
}
@ -131,6 +124,7 @@ where {
#?collection aocat:has_publisher / rdfs:label ?publisherName ;
# aocat:has_ARIADNE_subject ?archeologicalResourceType ;
# aocat:has_type / skos:prefLabel ?type .
?record aocat:is_part_of ?collection .
?collection aocat:was_issued ?issued .
optional {
{
@ -149,25 +143,18 @@ where {
#?archeologicalResourceType skos:prefLabel ?archeologicalResourceTypeName .
}
}
union
{
select *
where {
?spatial aocat:has_place_name ?spatialPlaceName .
optional {
{
?spatial aocat:has_place_name ?spatialPlaceName .
?spatial aocat:has_latitude ?spatialLocationLat .
BIND(uri(concat('http://www.myprefix/location/', md5(str(?spatialLocationLat)))) as ?blocation)
}
union
{
?spatial aocat:has_place_name ?spatialPlaceName .
?spatial aocat:has_longitude ?spatialLocationLon .
BIND(uri(concat('http://www.myprefix/location/', md5(str(?spatialLocationLon)))) as ?blocation)
?record aocat:has_spatial_coverage ?spatial .
?spatial aocat:has_place_name ?spatialPlaceName .
}
union
{
?record aocat:has_spatial_coverage ?spatial .
?spatial aocat:has_latitude ?spatialLocationLat ;
aocat:has_longitude ?spatialLocationLon .
BIND(uri(concat('http://www.myprefix/location/', md5(concat(str(?spatialLocationLat), str(?spatialLocationLon))))) as ?blocation)
@ -178,6 +165,6 @@ where {
BIND("organization" as ?contributorType) .
BIND("organization" as ?publisherType) .
}