You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AriadnePlus/dnet-ariadneplus-graphdb-pu.../src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/OEAW/ordered_sparql_insert_oeaw_...

148 lines
6.1 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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::oeaw::sites> {
?s aocat:has_type <https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/provided%20record> .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/provided%20record> rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Concept> .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/provided%20record> skos:prefLabel "provided record"
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::oeaw::sites> {
?s rdf:type aocat:AO_Individual_Data_Resource .
MINUS {
?s rdf:type aocat:AO_Individual_Data_Resource .
?s aocat:has_type ?t .
}
}
};
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/api_________::ariadne_plus::oeaw::sites> {
?record aocat:has_contributor ?contributor .
?contributor aocat:has_name ?contrib .
?record aocat:has_responsible ?legalResponsible .
?legalResponsible aocat:has_name ?resp .
?record aocat:has_owner ?owner .
?owner aocat:has_name ?own .
?record aocat:has_publisher ?publisher .
?publisher aocat:has_name ?pub .
?record aocat:has_creator ?creator .
?creator aocat:has_name ?creatorName .
?record aocat:has_access_rights ?accessRights .
}
}
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::oeaw::sites>
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::oeaw::CollectionInfo>
WHERE {
?record aocat:is_part_of ?collection .
?collection aocat:has_contributor ?contributor .
?contributor aocat:has_name ?contrib .
?collection aocat:has_responsible ?legalResponsible .
?legalResponsible aocat:has_name ?resp .
?collection aocat:has_owner ?owner .
?owner aocat:has_name ?own .
?collection aocat:has_publisher ?publisher .
?publisher aocat:has_name ?pub .
?collection aocat:has_creator ?creator .
?creator aocat:has_name ?creatorName .
?collection aocat:has_access_rights ?accessRights .
};
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::oeaw::aatplus> {
?record aocat:has_derived_subject ?aat_subject .
}
}
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::oeaw::aat>
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::oeaw::sites>
WHERE {
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:prefLabel ?nativeLabel .
?match_subject skos:prefLabel ?matchedLabel .
?match_subject skos:exactMatch ?aat_subject .
filter(str(?nativeLabel) = str(?matchedLabel))
}
union
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:prefLabel ?nativeLabel .
?match_subject skos:prefLabel ?matchedLabel .
?match_subject skos:broadMatch ?aat_subject .
filter(str(?nativeLabel) = str(?matchedLabel))
}
union
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:prefLabel ?nativeLabel .
?match_subject skos:prefLabel ?matchedLabel .
?match_subject skos:closeMatch ?aat_subject .
filter(str(?nativeLabel) = str(?matchedLabel))
}
union
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:prefLabel ?nativeLabel .
?match_subject skos:prefLabel ?matchedLabel .
?match_subject skos:narrowMatch ?aat_subject .
filter(str(?nativeLabel) = str(?matchedLabel))
}
};
PREFIX dcterms: <http://purl.org/dc/terms/>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::oeaw::periodo> {
?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/Q40> .
?periodO ?pred ?o .
optional {
?o ?pred2 ?o2 .
optional {
?o2 ?pred3 ?o3 .
}
}
}
};
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::oeaw::periodoplus> {
?temporal aocat:has_period ?periodO .
?temporal aocat:from ?temporalFrom .
?temporal aocat:until ?temporalUntil .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::oeaw::sites> {
?temporal aocat:has_native_period ?native_period .
?native_period skos:prefLabel ?native_label .
optional {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::oeaw::periodo> {
?periodO skos:altLabel ?native_label .
?periodO time:intervalStartedBy ?intervalStartedBy .
?intervalStartedBy time:hasDateTimeDescription ?startTimeDescr .
?startTimeDescr time:year ?temporalFrom .
?periodO time:intervalFinishedBy ?intervalFinishedBy .
?intervalFinishedBy time:hasDateTimeDescription ?finishedTimeDescr .
?finishedTimeDescr time:year ?temporalUntil .
}
}
}
};