AriadnePlus/dnet-ariadneplus-graphdb-pu.../src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/OEAW/ordered_sparql_insert_colle...

197 lines
8.2 KiB
SPARQL

PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> {
?s aocat:has_type <https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/collection> .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/collection> rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Concept> .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/collection> skos:prefLabel "collection"
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
MINUS {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
?s aocat:has_type ?t .
}
}
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
DELETE WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> {
?x aocat:from ""^^xsd:dateTime .
}
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
DELETE WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> {
?x aocat:until ""^^xsd:dateTime .
}
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> {
?s aocat:has_contributor <https://ariadne-infrastructure.eu/aocat/Agent/NOTPROVIDED> .
<https://ariadne-infrastructure.eu/aocat/Agent/NOTPROVIDED> rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Agent> .
<https://ariadne-infrastructure.eu/aocat/Agent/NOTPROVIDED> rdfs:label "Not provided" .
<https://ariadne-infrastructure.eu/aocat/Agent/NOTPROVIDED> aocat:has_name "Not provided" .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
MINUS {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
?s aocat:has_contributor ?agent .
}
}
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> {
?s aocat:has_creator <https://ariadne-infrastructure.eu/aocat/Agent/NOTPROVIDED> .
<https://ariadne-infrastructure.eu/aocat/Agent/NOTPROVIDED> rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Agent> .
<https://ariadne-infrastructure.eu/aocat/Agent/NOTPROVIDED> rdfs:label "Not provided" .
<https://ariadne-infrastructure.eu/aocat/Agent/NOTPROVIDED> aocat:has_name "Not provided" .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
MINUS {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
?s aocat:has_creator ?agent .
}
}
};
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/ariadneplus::arche::aatplus> {
?record aocat:has_derived_subject ?aat .
}
}
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::aat>
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai>
WHERE {
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:prefLabel ?native_label .
?match skos:prefLabel ?matchLabel .
?match skos:exactMatch ?aat .
FILTER(str(?matchLabel) = ?native_label)
}
union
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:prefLabel ?native_label .
?match skos:prefLabel ?matchLabel .
?match skos:broadMatch ?aat .
FILTER(str(?matchLabel) = ?native_label)
}
union
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:prefLabel ?native_label .
?match skos:prefLabel ?matchLabel .
?match skos:closeMatch ?aat .
FILTER(str(?matchLabel) = ?native_label)
}
union
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:prefLabel ?native_label .
?match skos:prefLabel ?matchLabel .
?match skos:narrowMatch ?aat .
FILTER(str(?matchLabel) = ?native_label)
}
};
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 {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::arche::periodoplus> {
?temporal aocat:has_period ?nativePeriod .
?temporal aocat:from ?temporalFrom .
?temporal aocat:until ?temporalUntil .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> {
?temporal aocat:has_native_period ?nativePeriod .
?temporal aocat:from ?temporalFrom .
?temporal aocat:until ?temporalUntil .
}
};
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 { ?lang skos:prefLabel ?label}
WHERE {
?s aocat:has_language ?lang .
?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" .
}
};