From 8469482e83463fef38996229b9a2ddad871176da Mon Sep 17 00:00:00 2001 From: Enrico Ottonello Date: Mon, 7 Feb 2022 10:56:34 +0100 Subject: [PATCH] enrichment for dolia all data --- .../INRAP/ordered_sparql_insert_dolia.sparql | 311 ++++++++++++++++++ 1 file changed, 311 insertions(+) create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INRAP/ordered_sparql_insert_dolia.sparql diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INRAP/ordered_sparql_insert_dolia.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INRAP/ordered_sparql_insert_dolia.sparql new file mode 100644 index 0000000..3226e0f --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INRAP/ordered_sparql_insert_dolia.sparql @@ -0,0 +1,311 @@ +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_temporal_coverage . + rdf:type . + rdfs:label "Not provided" . + + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_temporal_coverage ?tc . + } + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:has_language . + skos:prefLabel "und" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_language ?ns . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:was_modified "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:was_modified ?d . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:was_issued "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:was_issued ?d . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:has_access_rights "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_access_rights ?ar . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_temporal_coverage . + rdf:type . + rdfs:label "Not provided" . + + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_temporal_coverage ?tc . + } + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:has_language . + skos:prefLabel "und" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_language ?ns . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:was_modified "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:was_modified ?d . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:was_issued "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:was_issued ?d . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:has_access_rights "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_access_rights ?ar . + } + } +}; +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:has_access_rights ?accessRights . + ?record aocat:has_ARIADNE_subject ?archeologicalResourceType . + ?record aocat:has_owner ?owner . + ?record aocat:has_contributor ?contributor . + ?record aocat:was_modified ?modified . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:was_modified ?modified . + ?collection aocat:has_contributor ?contributor . + ?contributor aocat:has_name ?contrib . + ?collection aocat:has_owner ?owner . + ?owner aocat:has_name ?own . + ?collection aocat:has_access_rights ?accessRights . + ?collection aocat:has_ARIADNE_subject ?archeologicalResourceType . + ?archeologicalResourceType skos:prefLabel ?alabel . +}; + +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:has_native_subject . + rdf:type aocat:AO_Concept . + skos:prefLabel "Unknown" . + } +} +WHERE { + GRAPH { + ?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: +PREFIX skos: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:has_type . + skos:prefLabel "provided record" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_type . + } + } +}; + +PREFIX aocat: +PREFIX skos: + +INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat_subject . + } +} +USING +USING +WHERE { + { + ?record aocat:has_native_subject ?native_subject . + ?aat_native_subject skos:exactMatch ?aat_subject . + bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/INRAP/", ucase(strafter(str(?native_subject),"Inrap/")))) as ?uppercase_native_subject) + filter(?uppercase_native_subject=?aat_native_subject) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?aat_native_subject skos:broadMatch ?aat_subject . + bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/INRAP/", ucase(strafter(str(?native_subject),"Inrap/")))) as ?uppercase_native_subject) + filter(?uppercase_native_subject=?aat_native_subject) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?aat_native_subject skos:closeMatch ?aat_subject . + bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/INRAP/", ucase(strafter(str(?native_subject),"Inrap/")))) as ?uppercase_native_subject) + filter(?uppercase_native_subject=?aat_native_subject) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?aat_native_subject skos:narrowMatch ?aat_subject . + bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/INRAP/", ucase(strafter(str(?native_subject),"Inrap/")))) as ?uppercase_native_subject) + filter(?uppercase_native_subject=?aat_native_subject) + } +}; + +PREFIX skos: + PREFIX aocat: + PREFIX time: + PREFIX dcterms: + INSERT { + GRAPH { + ?temporal aocat:has_period ?periodO . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } + } + WHERE { + GRAPH { + ?temporal aocat:has_native_period ?native_period . + ?native_period skos:prefLabel ?p_label . + optional { + GRAPH { + ?periodO skos:altLabel ?p_label . + ?periodO time:intervalStartedBy / time:hasDateTimeDescription / time:year ?temporalFrom . + ?periodO time:intervalFinishedBy / time:hasDateTimeDescription / time:year ?temporalUntil . + } + } + } + }; \ No newline at end of file