From 8e5938777abcf0c62a499fb362a492b25553be57 Mon Sep 17 00:00:00 2001 From: Enrico Ottonello Date: Tue, 19 Jan 2021 14:54:04 +0100 Subject: [PATCH] sparql queries for fasti and niam --- .../enrich/ADS/ordered_sparql_insert_1.sparql | 19 ++-- .../FASTI/ordered_sparql_insert_fasti.sparql | 39 ++++++++ .../NIAM/ordered_sparql_insert_niam.sparql | 96 +++++++++++++++++++ 3 files changed, 144 insertions(+), 10 deletions(-) create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/FASTI/ordered_sparql_insert_fasti.sparql create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/NIAM/ordered_sparql_insert_niam.sparql diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1.sparql index a1d07bb..cc591f3 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1.sparql @@ -181,17 +181,16 @@ WHERE { } WHERE { GRAPH { - ?temporal aocat:has_native_period ?native_period . - ?native_period skos:prefLabel ?native_label . - optional { + ?temporal aocat:has_native_period ?native_period . + ?native_period skos:prefLabel ?native_label . GRAPH { - ?periodO skos:altLabel ?native_label . - ?periodO skos:inScheme . - ?periodO time:intervalStartedBy ?intervalStartedBy . - ?intervalStartedBy skos:prefLabel ?temporalFrom . - ?periodO time:intervalFinishedBy ?intervalFinishedBy . - ?intervalFinishedBy skos:prefLabel ?temporalUntil . + ?periodO skos:altLabel ?lowercase_native_label . + ?periodO skos:inScheme . + ?periodO time:intervalStartedBy ?intervalStartedBy . + ?intervalStartedBy skos:prefLabel ?temporalFrom . + ?periodO time:intervalFinishedBy ?intervalFinishedBy . + ?intervalFinishedBy skos:prefLabel ?temporalUntil . + BIND(ucase(?lowercase_native_label) as ?native_label) } } - } }; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/FASTI/ordered_sparql_insert_fasti.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/FASTI/ordered_sparql_insert_fasti.sparql new file mode 100644 index 0000000..a67a12d --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/FASTI/ordered_sparql_insert_fasti.sparql @@ -0,0 +1,39 @@ +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:was_issued "2020-10-16"^^xsd:dateTime . + ?s aocat:was_modified "2020-10-16"^^xsd:dateTime . + } +} +USING +WHERE { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:was_issued ?issued . + ?s aocat:was_modified ?modified . + } +}; + +PREFIX aocat: +PREFIX rdf: +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 . + } + } +}; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/NIAM/ordered_sparql_insert_niam.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/NIAM/ordered_sparql_insert_niam.sparql new file mode 100644 index 0000000..a517a40 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/NIAM/ordered_sparql_insert_niam.sparql @@ -0,0 +1,96 @@ +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 ariadneplus: + +INSERT { + GRAPH { + ?record aocat:was_issued ?issued . + ?record aocat:was_modified ?modified . + ?record aocat:has_contributor ?contributor . + ?record aocat:has_responsible ?legalResponsible . + ?record aocat:has_owner ?owner . + ?record aocat:has_publisher ?publisher . + ?record aocat:has_access_rights ?accessRights . + ?record aocat:has_ARIADNE_subject ?archeologicalResourceType . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:was_issued ?issued . + ?collection aocat:was_modified ?modified . + ?collection aocat:has_contributor ?contributor . + ?collection aocat:has_responsible ?legalResponsible . + ?collection aocat:has_owner ?owner . + ?collection aocat:has_publisher ?publisher . + ?collection aocat:has_access_rights ?accessRights . + ?collection aocat:has_ARIADNE_subject ?archeologicalResourceType . +}; + +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:has_native_subject . + skos:prefLabel "Not provided" . + } +} +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 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 ?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 . + } + } + } + }; \ No newline at end of file