query with union
This commit is contained in:
parent
5d8cbece81
commit
911ea12ac3
|
@ -47,24 +47,52 @@ CONSTRUCT {
|
||||||
?record mine:partOf ?collection .
|
?record mine:partOf ?collection .
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#from onto:explain
|
||||||
|
|
||||||
where {
|
where {
|
||||||
?record aocat:has_title ?title ;
|
?record aocat:has_title ?title ;
|
||||||
aocat:has_access_policy / rdfs:label ?accessRights ;
|
# aocat:has_access_rights ?accessRights ;
|
||||||
aocat:has_description ?description ;
|
aocat:has_creator / aocat:has_name ?contributorName ;
|
||||||
aocat:has_creator / aocat:has_name ?contributorName ;
|
|
||||||
aocat:has_creator / aocat:has_email ?contributorEmail ;
|
aocat:has_creator / aocat:has_email ?contributorEmail ;
|
||||||
|
|
||||||
aocat:has_access_policy ?accessPolicy ;
|
|
||||||
aocat:has_landing_page / rdfs:label ?landingPage ;
|
|
||||||
aocat:is_part_of ?collection ;
|
|
||||||
aocat:has_spatial_coverage ?spatial ;
|
aocat:has_spatial_coverage ?spatial ;
|
||||||
aocat:has_native_subject / skos:prefLabel ?nativeSbj ;
|
aocat:has_native_subject / skos:prefLabel ?nativeSbj ;
|
||||||
aocat:has_original_id ?originalId ;
|
aocat:has_original_id ?originalId ;
|
||||||
aocat:has_temporal_coverage / aocat:has_period / skos:prefLabel ?temporalPeriodName ;
|
|
||||||
aocat:has_temporal_coverage / aocat:from ?from ;
|
|
||||||
aocat:has_temporal_coverage / aocat:until ?until ;
|
|
||||||
aocat:has_language / skos:prefLabel ?language .
|
aocat:has_language / skos:prefLabel ?language .
|
||||||
|
{
|
||||||
|
?record aocat:has_access_rights ?accessRights .
|
||||||
|
}
|
||||||
|
union
|
||||||
|
{
|
||||||
|
?record aocat:has_description ?description .
|
||||||
|
}
|
||||||
|
union
|
||||||
|
{
|
||||||
|
?record aocat:has_access_policy / rdfs:label ?accessPolicy .
|
||||||
|
}
|
||||||
|
union
|
||||||
|
{
|
||||||
|
?record aocat:has_landing_page / rdfs:label ?landingPage .
|
||||||
|
}
|
||||||
|
union
|
||||||
|
{
|
||||||
|
?record aocat:is_part_of ?collection .
|
||||||
|
}
|
||||||
|
union
|
||||||
|
{
|
||||||
|
?record aocat:has_temporal_coverage ?t .
|
||||||
|
?t aocat:has_period / skos:prefLabel ?temporalPeriodName .
|
||||||
|
}
|
||||||
|
union
|
||||||
|
{
|
||||||
|
?record aocat:has_temporal_coverage ?t .
|
||||||
|
?t aocat:from ?from .
|
||||||
|
}
|
||||||
|
union
|
||||||
|
{
|
||||||
|
?record aocat:has_temporal_coverage ?t .
|
||||||
|
?t aocat:until ?until .
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
select *
|
select *
|
||||||
where {
|
where {
|
||||||
|
@ -79,14 +107,28 @@ where {
|
||||||
{
|
{
|
||||||
select *
|
select *
|
||||||
where {
|
where {
|
||||||
?spatial aocat:has_place_name ?spatialPlaceName ;
|
?spatial aocat:has_place_name ?spatialPlaceName .
|
||||||
aocat:has_latitude ?spatialLocationLat ;
|
{
|
||||||
|
?spatial aocat:has_latitude ?spatialLocationLat .
|
||||||
|
BIND(uri(concat('http://www.myprefix/location/', md5(str(?spatialLocationLat)))) as ?blocation)
|
||||||
|
}
|
||||||
|
union
|
||||||
|
{
|
||||||
|
?spatial aocat:has_longitude ?spatialLocationLon .
|
||||||
|
BIND(uri(concat('http://www.myprefix/location/', md5(str(?spatialLocationLon)))) as ?blocation)
|
||||||
|
}
|
||||||
|
union
|
||||||
|
{
|
||||||
|
?spatial aocat:has_latitude ?spatialLocationLat ;
|
||||||
aocat:has_longitude ?spatialLocationLon .
|
aocat:has_longitude ?spatialLocationLon .
|
||||||
BIND(uri(concat('http://www.myprefix/location/', md5(concat(str(?spatialLocationLat), str(?spatialLocationLon))))) as ?blocation)
|
BIND(uri(concat('http://www.myprefix/location/', md5(concat(str(?spatialLocationLat), str(?spatialLocationLon))))) as ?blocation)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BIND("organization" as ?contributorType) .
|
BIND("organization" as ?contributorType) .
|
||||||
BIND("organization" as ?publisherType) .
|
BIND("organization" as ?publisherType) .
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue