Updated ARCHE query for periods

This commit is contained in:
Alessia Bardi 2023-05-16 13:45:56 +02:00
parent f09e4ab822
commit 39c6f5da81
1 changed files with 72 additions and 19 deletions

View File

@ -117,16 +117,62 @@ WHERE {
}; };
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/> PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
WITH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai>
DELETE { ?period skos:prefLabel ?label}
WHERE {
?temporal aocat:has_period ?period .
?period skos:prefLabel ?label
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::arche::periodo> {
?nativePeriod skos:prefLabel ?periodLabel .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> {
?temporal aocat:has_native_period ?nativePeriod .
?nativePeriod skos:prefLabel ?periodLabel .
}
};
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX time: <http://www.w3.org/2006/time#>
PREFIX ariadneplus: <https://ariadne-infrastructure.eu/aocat/>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::arche::periodoplus> {
?temporal aocat:has_period ?periodOURI .
?temporal aocat:from ?temporalFrom .
?temporal aocat:until ?temporalUntil .
}
}
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai>
USING <https://ariadne-infrastructure.eu/ariadneplus::arche::periodo>
WHERE {
?temporal aocat:has_period ?periodOURI .
?periodOURI time:intervalStartedBy ?intervalStartedBy .
?intervalStartedBy time:hasDateTimeDescription ?startDescr .
?startDescr time:year ?temporalFrom .
?periodOURI time:intervalFinishedBy ?intervalFinishedBy .
?intervalFinishedBy time:hasDateTimeDescription ?finishDescr .
?finishDescr time:year ?temporalUntil
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
INSERT { INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::arche::periodoplus> { GRAPH <https://ariadne-infrastructure.eu/ariadneplus::arche::periodoplus> {
?temporal aocat:has_period ?period . ?temporal aocat:has_period ?nativePeriod .
?temporal aocat:from ?temporalFrom . ?temporal aocat:from ?temporalFrom .
?temporal aocat:until ?temporalUntil . ?temporal aocat:until ?temporalUntil .
} }
} }
WHERE { WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> { GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> {
?temporal aocat:has_period ?period . ?temporal aocat:has_native_period ?nativePeriod .
?temporal aocat:from ?temporalFrom . ?temporal aocat:from ?temporalFrom .
?temporal aocat:until ?temporalUntil . ?temporal aocat:until ?temporalUntil .
} }
@ -134,11 +180,18 @@ PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/> PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
WITH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> WITH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai>
DELETE { ?period skos:prefLabel ?label} DELETE { ?lang skos:prefLabel ?label}
WHERE { WHERE {
?temporal aocat:has_period ?period . ?s aocat:has_language ?lang .
?period skos:prefLabel ?label ?lang skos:prefLabel ?label
} };
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
INSERT DATA {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> {
<http://lexvo.org/id/iso639-2/en> skos:prefLabel "en" .
<http://lexvo.org/id/iso639-2/de> skos:prefLabel "de" .
}
};