optimized query using named graph
This commit is contained in:
parent
ce8bca3a44
commit
49d698a532
|
@ -68,12 +68,8 @@ CONSTRUCT {
|
||||||
%record aoprop:description ?description .
|
%record aoprop:description ?description .
|
||||||
%record aoprop:language ?language .
|
%record aoprop:language ?language .
|
||||||
}
|
}
|
||||||
from <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::aat>
|
|
||||||
from <https://ariadne-infrastructure.eu/ariadneplus::%datasource::aatplus>
|
|
||||||
from <https://ariadne-infrastructure.eu/ariadneplus::%datasource::periodo>
|
|
||||||
from <https://ariadne-infrastructure.eu/ariadneplus::%datasource::periodoplus>
|
|
||||||
from <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId>
|
|
||||||
where {
|
where {
|
||||||
|
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||||
%record aocat:has_language / skos:prefLabel ?language .
|
%record aocat:has_language / skos:prefLabel ?language .
|
||||||
%record aocat:has_original_id ?originalId .
|
%record aocat:has_original_id ?originalId .
|
||||||
%record aocat:is_part_of ?partOf .
|
%record aocat:is_part_of ?partOf .
|
||||||
|
@ -81,12 +77,6 @@ where {
|
||||||
?creator aocat:has_name ?creatorName .
|
?creator aocat:has_name ?creatorName .
|
||||||
%record aocat:has_title ?title .
|
%record aocat:has_title ?title .
|
||||||
%record aocat:has_type / skos:prefLabel ?resourceType .
|
%record aocat:has_type / skos:prefLabel ?resourceType .
|
||||||
%record aocat:has_native_subject ?nativeSubject .
|
|
||||||
?nativeSubject skos:prefLabel ?nativeSubjectPrefLabel .
|
|
||||||
optional {
|
|
||||||
%record aocat:has_derived_subject ?derivedSubject .
|
|
||||||
?derivedSubject skos:prefLabel ?derivedSubjectPrefLabel .
|
|
||||||
}
|
|
||||||
optional {
|
optional {
|
||||||
?creator aocat:has_email ?creatorEmail .
|
?creator aocat:has_email ?creatorEmail .
|
||||||
}
|
}
|
||||||
|
@ -99,23 +89,40 @@ where {
|
||||||
optional {
|
optional {
|
||||||
%record aocat:has_landing_page / rdfs:label ?landingPage .
|
%record aocat:has_landing_page / rdfs:label ?landingPage .
|
||||||
}
|
}
|
||||||
optional {
|
}
|
||||||
|
|
||||||
|
optional {
|
||||||
|
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||||
%record aocat:has_temporal_coverage ?temporalNative .
|
%record aocat:has_temporal_coverage ?temporalNative .
|
||||||
?temporalNative aocat:has_native_period / skos:prefLabel ?temporalNativePeriodName .
|
?temporalNative aocat:has_native_period ?nativeLabel .
|
||||||
|
?nativeLabel skos:prefLabel ?temporalNativePeriodName .
|
||||||
|
}
|
||||||
|
graph <https://ariadne-infrastructure.eu/ariadneplus::%datasource::periodoplus> {
|
||||||
optional {
|
optional {
|
||||||
?temporalNative aocat:from ?temporalNativeFrom .
|
?temporalNative aocat:from ?temporalNativeFrom .
|
||||||
?temporalNative aocat:until ?temporalNativeUntil .
|
?temporalNative aocat:until ?temporalNativeUntil .
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
optional {
|
}
|
||||||
%record aocat:has_temporal_coverage ?temporal .
|
|
||||||
?temporal aocat:has_period / skos:prefLabel ?temporalPeriodName .
|
|
||||||
optional {
|
optional {
|
||||||
|
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||||
|
%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 ?temporalPeriodName .
|
||||||
|
}
|
||||||
|
optional {
|
||||||
?temporal aocat:from ?temporalFrom .
|
?temporal aocat:from ?temporalFrom .
|
||||||
?temporal aocat:until ?temporalUntil .
|
?temporal aocat:until ?temporalUntil .
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||||
{
|
{
|
||||||
select *
|
select *
|
||||||
where {
|
where {
|
||||||
|
@ -146,7 +153,9 @@ where {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||||
{
|
{
|
||||||
select *
|
select *
|
||||||
where {
|
where {
|
||||||
|
@ -170,5 +179,31 @@ where {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
|
||||||
|
{
|
||||||
|
select *
|
||||||
|
where {
|
||||||
|
%record aocat:has_native_subject ?nativeSubject .
|
||||||
|
?nativeSubject skos:prefLabel ?nativeSubjectPrefLabel .
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
graph <https://ariadne-infrastructure.eu/ariadneplus::%datasource::aatplus> {
|
||||||
|
{
|
||||||
|
select *
|
||||||
|
where {
|
||||||
|
optional {
|
||||||
|
%record aocat:has_derived_subject ?derivedSubject .
|
||||||
|
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::aat> {
|
||||||
|
?derivedSubject skos:prefLabel ?derivedSubjectPrefLabel .
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BIND (lang(?derivedSubjectPrefLabel) as ?aatSubjectsLang)
|
BIND (lang(?derivedSubjectPrefLabel) as ?aatSubjectsLang)
|
||||||
}
|
}
|
Loading…
Reference in New Issue