From a2ab5d747862882e8f26d139c8349b06f61a2d1d Mon Sep 17 00:00:00 2001 From: Enrico Ottonello Date: Fri, 11 Feb 2022 15:07:54 +0100 Subject: [PATCH] enrichment for LNEC --- .../LNEC/ordered_sparql_insert_LNEC.sparql | 143 ++++++++++++++++++ ...dered_sparql_insert_LNEC_collection.sparql | 40 +++++ 2 files changed, 183 insertions(+) create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/LNEC/ordered_sparql_insert_LNEC.sparql create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/LNEC/ordered_sparql_insert_LNEC_collection.sparql diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/LNEC/ordered_sparql_insert_LNEC.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/LNEC/ordered_sparql_insert_LNEC.sparql new file mode 100644 index 0000000..26b6d6b --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/LNEC/ordered_sparql_insert_LNEC.sparql @@ -0,0 +1,143 @@ +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:has_owner ?owner . + ?owner aocat:has_name ?own . + ?record aocat:has_responsible ?legalResponsible . + ?legalResponsible aocat:has_name ?resp . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_owner ?owner . + ?owner aocat:has_name ?own . + ?collection aocat:has_responsible ?legalResponsible . + ?legalResponsible aocat:has_name ?resp . +}; + +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_creator . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_creator ?creator . + } + } +}; + +PREFIX aocat: + PREFIX rdf: + PREFIX rdfs: + PREFIX skos: + INSERT { + GRAPH { + ?s aocat:has_type . + rdf: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 ?t . + } + } + }; + + PREFIX aocat: + PREFIX skos: + INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat . + } + } + WHERE { + GRAPH { + ?record aocat:has_native_subject ?ns. + GRAPH { + { + ?ns skos:closeMatch ?aat . + } + union + { + ?ns skos:exactMatch ?aat . + } + union + { + ?ns skos:narrowMatch ?aat . + } + union + { + ?ns skos:broadMatch ?aat . + } + } + } + }; + + PREFIX aocat: + PREFIX skos: + PREFIX rdf: + PREFIX rdfs: + PREFIX owl: + PREFIX ariadneplus: + PREFIX time: + PREFIX periodo: + 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 ?native_label . + optional { + GRAPH { + ?periodO skos:altLabel ?native_label . + ?periodO time:intervalStartedBy / time:hasDateTimeDescription / time:year ?temporalFrom . + ?periodO time:intervalFinishedBy / time:hasDateTimeDescription / time:year ?temporalUntil . + } + } + } + }; + + PREFIX aocat: + PREFIX rdf: + PREFIX rdfs: + INSERT { + GRAPH { + ?s aocat:has_spatial_coverage . + rdf:type . + rdfs:label "Name not provided" . + aocat:has_place_name "Name 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 . + ?spatialRegion aocat:has_place_name ?placeName . + } + } + }; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/LNEC/ordered_sparql_insert_LNEC_collection.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/LNEC/ordered_sparql_insert_LNEC_collection.sparql new file mode 100644 index 0000000..e556c26 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/LNEC/ordered_sparql_insert_LNEC_collection.sparql @@ -0,0 +1,40 @@ +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 skos: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:was_issued ?created_on . + ?s aocat:was_modified ?created_on . + } +} +USING +WHERE { + ?s rdf:type aocat:AO_Collection . + ?s aocat:was_created_on ?created_on . + MINUS { + ?s rdf:type aocat:AO_Collection . + ?s aocat:was_issued ?issued . + } +}; \ No newline at end of file