fix HNM periodo graph creation with all needed information, fix HNM periodoplus graph creation retrieving from/until date in year format; 858 sparql insert queries

pull/2/head
Enrico Ottonello 4 years ago
parent 0d44e18674
commit 05c3682e0d

@ -26,4 +26,4 @@ WHERE {
?collection aocat:has_publisher ?publisher .
?collection aocat:has_access_rights ?accessRights .
?collection aocat:has_ARIADNE_subject ?archeologicalResourceType .
}
};

@ -0,0 +1,121 @@
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::858> {
?collection aocat:has_ARIADNE_subject ?archeologicalResourceType .
?archeologicalResourceType skos:prefLabel ?archeologicalResourceTypeName .
?archeologicalResourceType rdfs:label ?archeologicalResourceTypeName .
}
}
WHERE {
?collection rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
?collection aocat:has_ARIADNE_subject ?archeologicalResourceType .
?archeologicalResourceType skos:prefLabel ?archeologicalResourceTypeName .
?collection aocat:has_original_id "1000858" .
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX ariadneplus: <https://ariadne-infrastructure.eu/aocat/>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::858> {
?record aocat:was_issued ?issued .
?record aocat:was_modified ?modified .
?record aocat:has_contributor ?contributor .
?record aocat:has_responsible ?legalResponsible .
?record aocat:has_owner ?owner .
?record aocat:has_publisher ?publisher .
?record aocat:has_access_rights ?accessRights .
?record aocat:has_ARIADNE_subject ?archeologicalResourceType .
}
}
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::858>
WHERE {
?record aocat:is_part_of ?collection .
?collection aocat:was_issued ?issued .
?collection aocat:was_modified ?modified .
?collection aocat:has_contributor ?contributor .
?collection aocat:has_responsible ?legalResponsible .
?collection aocat:has_owner ?owner .
?collection aocat:has_publisher ?publisher .
?collection aocat:has_access_rights ?accessRights .
?collection aocat:has_ARIADNE_subject ?archeologicalResourceType .
};
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::858> {
?s aocat:has_native_subject <https://ariadne-infrastructure.eu/aocat/Concept/ads/NOT_PROVIDED> .
<https://ariadne-infrastructure.eu/aocat/Concept/ads/NOT_PROVIDED> skos:prefLabel "Not provided" .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::858> {
?s rdf:type aocat:AO_Individual_Data_Resource .
MINUS {
?s rdf:type aocat:AO_Individual_Data_Resource .
?s aocat:has_native_subject ?ns .
}
}
};
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::ads::aatplus> {
?record aocat:has_derived_subject ?aat .
}
}
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::aat>
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::858>
WHERE {
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:exactMatch ?aat .
}
union
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:broadMatch ?aat .
}
union
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:closeMatch ?aat .
}
union
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:narrowMatch ?aat .
}
};
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#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::ads::periodoplus> {
?temporal aocat:has_period ?periodO .
?temporal aocat:from ?temporalFrom .
?temporal aocat:until ?temporalUntil .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::858> {
?temporal aocat:has_native_period ?native_period .
?native_period skos:prefLabel ?native_label .
optional {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::ads::periodo> {
?periodO skos:altLabel ?native_label .
?periodO skos:inScheme <http://n2t.net/ark:/99152/p0kh9ds> .
?periodO time:intervalStartedBy ?intervalStartedBy .
?intervalStartedBy skos:prefLabel ?temporalFrom .
?periodO time:intervalFinishedBy ?intervalFinishedBy .
?intervalFinishedBy skos:prefLabel ?temporalUntil .
}
}
}
};

@ -154,13 +154,21 @@ WHERE {
PREFIX dcterms: <http://purl.org/dc/terms/>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::hnm::periodo> {
?periodO ?pred ?o .
?periodO ?pred ?o .
?o ?pred2 ?o2 .
?o2 ?pred3 ?o3 .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/ariadne/periodo> {
?periodO dcterms:spatial <http://www.wikidata.org/entity/Q28> .
?periodO ?pred ?o .
optional {
?o ?pred2 ?o2 .
optional {
?o2 ?pred3 ?o3 .
}
}
}
};
@ -182,10 +190,8 @@ INSERT {
optional {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::hnm::periodo> {
?periodO skos:altLabel ?native_label .
?periodO time:intervalStartedBy ?intervalStartedBy .
?intervalStartedBy skos:prefLabel ?temporalFrom .
?periodO time:intervalFinishedBy ?intervalFinishedBy .
?intervalFinishedBy skos:prefLabel ?temporalUntil .
?periodO time:intervalStartedBy / time:hasDateTimeDescription / time:year ?temporalFrom .
?periodO time:intervalFinishedBy / time:hasDateTimeDescription / time:year ?temporalUntil .
}
}
}

Loading…
Cancel
Save