From b55c9f352fea34389a77805b62c8c68a08fc8ed5 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Thu, 16 Jun 2022 20:07:45 +0200 Subject: [PATCH 1/2] enrichment queries for CNRS Humanum --- .../ordered_sparql_insert_CNRS_archaeo.sparql | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CNRS/ordered_sparql_insert_CNRS_archaeo.sparql diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CNRS/ordered_sparql_insert_CNRS_archaeo.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CNRS/ordered_sparql_insert_CNRS_archaeo.sparql new file mode 100644 index 0000000..da03a67 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CNRS/ordered_sparql_insert_CNRS_archaeo.sparql @@ -0,0 +1,147 @@ +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:is_part_of ?collection + } +} +WHERE { + GRAPH { + ?collection rdf:type . + ?collection aocat:has_part ?s + } +}; + +PREFIX aocat: +PREFIX rdf: +PREFIX skos: +INSERT DATA{ + GRAPH { + skos:prefLabel "eng" . + skos:prefLabel "fre" . + skos:prefLabel "Fieldwork"@en . + skos:prefLabel "Fieldwork archive"@en . + skos:prefLabel "Fieldwork report"@en . + skos:prefLabel "Site/monument"@en . + skos:prefLabel "collection" . + + } +}; +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +PREFIX skos: +INSERT { + GRAPH { + ?s aocat:has_type . + rdf:type . + skos:prefLabel "collection" + } + } + WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_type ?t . + } + } +}; +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +PREFIX skos: +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 rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_spatial_coverage . + rdf:type . + rdfs:label "Place not provided" . + aocat:has_place_name "Place not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_spatial_coverage ?spatialRegion . + } + } +}; +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?spatialRegion rdfs:label "Place name not provided" . + ?spatialRegion aocat:has_place_name "Place name not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_spatial_coverage ?spatialRegion . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_spatial_coverage ?spatialRegion . + ?spatialRegion aocat:has_place_name ?placeName . + } + } +}; +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +PREFIX skos: +INSERT { + GRAPH { + ?ns skos:prefLabel ?nstitle . + } + } + WHERE { + GRAPH { + ?s aocat:has_native_subject ?ns . + ?ns aocat:has_title ?nstitle + } +}; +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + + ?x aocat:has_name "Name not provided" . + + } + } + WHERE { + GRAPH { + ?s rdf:type . + ?s aocat:has_responsible ?x . + MINUS{ + ?s rdf:type . + ?s aocat:has_responsible ?x . + ?x aocat:has_name ?legalResponsibleName . + } + + } +}; + From 600f80317cae7f7283eb1e5090228b5a23cc4d12 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Thu, 16 Jun 2022 20:08:10 +0200 Subject: [PATCH 2/2] enrichment queries for THANADOS --- .../ordered_sparql_insert_THANADOS.sparql | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/THANADOS/ordered_sparql_insert_THANADOS.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/THANADOS/ordered_sparql_insert_THANADOS.sparql index 6191847..3cfaefa 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/THANADOS/ordered_sparql_insert_THANADOS.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/THANADOS/ordered_sparql_insert_THANADOS.sparql @@ -317,6 +317,72 @@ INSERT { } }; +PREFIX skos: +PREFIX aocat: +INSERT { + GRAPH { + ?s aocat:has_derived_subject ?aat . + } +} +USING +USING +WHERE { + { + ?s aocat:has_native_subject ?native_subject . + ?aatmatch owl:sameAs ?vocuri . + ?aatmatch skos:exactMatch ?aat . + bind (IRI(concat( "https://thanados.net/vocabulary/", ucase(strafter(str(?native_subject),"THANADOS/")))) as ?vocuribuilt) + filter(?vocuri=?vocuribuilt) + } + union + { + ?s aocat:has_native_subject ?native_subject . + ?aatmatch owl:sameAs ?vocuri . + ?aatmatch skos:broadMatch ?aat . + bind (IRI(concat( "https://thanados.net/vocabulary/", ucase(strafter(str(?native_subject),"THANADOS/")))) as ?vocuribuilt) + filter(?vocuri=?vocuribuilt) + } + union + { + ?s aocat:has_native_subject ?native_subject . + ?aatmatch owl:sameAs ?vocuri . + ?aatmatch skos:closeMatch ?aat . + bind (IRI(concat( "https://thanados.net/vocabulary/", ucase(strafter(str(?native_subject),"THANADOS/")))) as ?vocuribuilt) + filter(?vocuri=?vocuribuilt) + + } + union + { + ?s aocat:has_native_subject ?native_subject . + ?aatmatch owl:sameAs ?vocuri . + ?aatmatch skos:narrowMatch ?aat . + bind (IRI(concat( "https://thanados.net/vocabulary/", ucase(strafter(str(?native_subject),"THANADOS/")))) as ?vocuribuilt) + filter(?vocuri=?vocuribuilt) + + } +}; + +PREFIX skos: +PREFIX aocat: +PREFIX time: +PREFIX dcterms: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } +} +USING +USING +WHERE { + ?temporal aocat:has_period ?periodO_URI . + ?periodO_URI time:intervalStartedBy / time:hasDateTimeDescription / time:year ?temporalFrom . + ?periodO_URI time:intervalFinishedBy / time:hasDateTimeDescription / time:year ?temporalUntil . +}; + + +