From 23f1feb44a7fc8c3363effc9cb936fc0d1a27ccb Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Fri, 7 Aug 2020 16:41:07 +0200 Subject: [PATCH] updated SPARQL inserts for ADS --- .../ADS/ordered_sparql_insert_1957.sparql | 215 ++++++++++ .../ADS/ordered_sparql_insert_270.sparql | 310 ++++++++++----- .../ADS/ordered_sparql_insert_273.sparql | 342 +++++++++------- .../ADS/ordered_sparql_insert_836.sparql | 372 ++++++++++-------- 4 files changed, 834 insertions(+), 405 deletions(-) create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1957.sparql diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1957.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1957.sparql new file mode 100644 index 0000000..f1e746c --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1957.sparql @@ -0,0 +1,215 @@ +PREFIX aocat: +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 . + MINUS { + ?s rdf:type . + ?s aocat:has_creator ?agent . + } + } +}; +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: + INSERT { + GRAPH { + ?s aocat:has_owner . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } + } + WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_owner ?agent . + } + } + }; + PREFIX aocat: + PREFIX rdf: + PREFIX rdfs: + INSERT { + GRAPH { + ?s aocat:has_responsible . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } + } + WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_responsible ?agent . + } + } + }; + + + + PREFIX aocat: + 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 skos: + PREFIX aocat: + 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 rdf: + INSERT { + GRAPH { + ?s aocat:has_language . + skos:prefLabel "und" . + } + } + WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_language ?ns . + } + } + }; + + PREFIX aocat: + PREFIX rdf: + INSERT { + GRAPH { + ?s aocat:has_creator . + 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: + INSERT { + GRAPH { + ?s aocat:has_title "Title not provided" . + } + } + WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_title ?title . + } + } + }; + + + PREFIX skos: + PREFIX aocat: + INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat . + } + } + USING + USING + WHERE { + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:exactMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:broadMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:closeMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:narrowMatch ?aat . + } + }; + + PREFIX skos: + PREFIX aocat: + PREFIX time: + INSERT { + GRAPH { + ?temporal aocat:has_period ?periodO . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } + } + WHERE { + ?temporal aocat:has_native_period ?native_period . + ?native_period skos:prefLabel ?native_label . + optional { + ?periodO skos:altLabel ?native_label . + ?periodO skos:inScheme . + ?periodO time:intervalStartedBy ?intervalStartedBy . + ?intervalStartedBy skos:prefLabel ?temporalFrom . + ?periodO time:intervalFinishedBy ?intervalFinishedBy . + ?intervalFinishedBy skos:prefLabel ?temporalUntil . + } + }; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_270.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_270.sparql index 68ae219..ead5e5c 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_270.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_270.sparql @@ -1,101 +1,215 @@ -PREFIX aocat: -PREFIX skos: -PREFIX time: -PREFIX ariadneplus: -PREFIX rdf: -INSERT { - GRAPH { - ?temporal aocat:has_period ?periodO . - ?temporal aocat:from ?temporalFrom . - ?temporal aocat:until ?temporalUntil . - } -} -WHERE { - ?temporal aocat:has_native_period ?native_period . - ?native_period skos:prefLabel ?native_label . - optional { - ?periodO skos:altLabel ?native_label . - ?periodO skos:inScheme . - ?periodO time:intervalStartedBy ?intervalStartedBy . - ?intervalStartedBy skos:prefLabel ?temporalFrom . - ?periodO time:intervalFinishedBy ?intervalFinishedBy . - ?intervalFinishedBy skos:prefLabel ?temporalUntil . - } -} -; -INSERT { - GRAPH { - ?record aocat:has_derived_subject ?aat . - } -} -USING -USING -WHERE { - { - ?record aocat:has_native_subject ?native_subject . - ?native_subject skos:exactMatch ?aat . - } - union - { - ?record aocat:has_native_subject ?native_subject . - ?native_subject skos:broadMatch ?aat . - } - union - { - ?record aocat:has_native_subject ?native_subject . - ?native_subject skos:closeMatch ?aat . - } - union - { - ?record aocat:has_native_subject ?native_subject . - ?native_subject skos:narrowMatch ?aat . - } -} -; - -PREFIX aocat: -PREFIX skos: -PREFIX time: -PREFIX ariadneplus: +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: 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 . + ?s aocat:has_creator . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } } -} -USING -WHERE { - ?record aocat:is_part_of ?collection . - ?collection aocat:was_issued ?issued . - ?collection aocat:was_modified ?modified . - ?collection aocat:has_contributor ?contributor . - ?contributor aocat:has_name ?contributorName . - ?collection aocat:has_responsible ?legalResponsible . - ?legalResponsible aocat:has_name ?legalResponsibleName . - ?collection aocat:has_owner ?owner . - ?owner aocat:has_name ?ownerName . - ?collection aocat:has_publisher ?publisher . - ?publisher aocat:has_name ?publisherName . - ?collection aocat:has_access_rights ?accessRights . - ?collection aocat:has_ARIADNE_subject ?archeologicalResourceType . - ?archeologicalResourceType skos:prefLabel ?archeologicalResourceTypeName . - optional { - ?contributor aocat:has_email ?contributorEmail . - } - optional { - ?legalResponsible aocat:has_email ?legalResponsibleEmail . - } - optional { - ?owner aocat:has_email ?ownerEmail . - } - optional { - ?publisher aocat:has_email ?publisherEmail . - } -} -; \ No newline at end of file + WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_creator ?agent . + } + } +}; +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: + INSERT { + GRAPH { + ?s aocat:has_owner . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } + } + WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_owner ?agent . + } + } + }; + PREFIX aocat: + PREFIX rdf: + PREFIX rdfs: + INSERT { + GRAPH { + ?s aocat:has_responsible . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } + } + WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_responsible ?agent . + } + } + }; + + + + PREFIX aocat: + 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 skos: + PREFIX aocat: + 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 rdf: + INSERT { + GRAPH { + ?s aocat:has_language . + skos:prefLabel "und" . + } + } + WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_language ?ns . + } + } + }; + + PREFIX aocat: + PREFIX rdf: + INSERT { + GRAPH { + ?s aocat:has_creator . + 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: + INSERT { + GRAPH { + ?s aocat:has_title "Title not provided" . + } + } + WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_title ?title . + } + } + }; + + + PREFIX skos: + PREFIX aocat: + INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat . + } + } + USING + USING + WHERE { + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:exactMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:broadMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:closeMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:narrowMatch ?aat . + } + }; + + PREFIX skos: + PREFIX aocat: + PREFIX time: + INSERT { + GRAPH { + ?temporal aocat:has_period ?periodO . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } + } + WHERE { + ?temporal aocat:has_native_period ?native_period . + ?native_period skos:prefLabel ?native_label . + optional { + ?periodO skos:altLabel ?native_label . + ?periodO skos:inScheme . + ?periodO time:intervalStartedBy ?intervalStartedBy . + ?intervalStartedBy skos:prefLabel ?temporalFrom . + ?periodO time:intervalFinishedBy ?intervalFinishedBy . + ?intervalFinishedBy skos:prefLabel ?temporalUntil . + } + }; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_273.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_273.sparql index 1b6fa59..eca2a4c 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_273.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_273.sparql @@ -1,147 +1,215 @@ -PREFIX skos: PREFIX aocat: PREFIX rdf: PREFIX rdfs: -PREFIX time: -PREFIX ariadneplus: - -# INHERIT FROM COLLECTION 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 . -} - -# INSERT DEFAULTS FOR RECORDS - -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 . + ?s aocat:has_creator . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . } } -}; -INSERT { - GRAPH { - ?s aocat:has_language . - skos:prefLabel "und" . - } -} -WHERE { - GRAPH { - ?s rdf:type aocat:AO_Individual_Data_Resource . - MINUS { - ?s rdf:type aocat:AO_Individual_Data_Resource . - ?s aocat:has_language ?ns . - } - } -}; -INSERT { - GRAPH { - ?s aocat:has_creator . - 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 . - } - } -}; - -INSERT { - GRAPH { - ?s aocat:has_title "Title not provided" . - } -} -WHERE { - GRAPH { - ?s rdf:type aocat:AO_Individual_Data_Resource . - MINUS { - ?s rdf:type aocat:AO_Individual_Data_Resource . - ?s aocat:has_title ?title . - } - } -}; - - -#AAT ENRICHMENT -INSERT { - GRAPH { - ?record aocat:has_derived_subject ?aat . - } -} -USING -USING -WHERE { - { - ?record aocat:has_native_subject ?native_subject . - ?native_subject skos:exactMatch ?aat . - } - union - { - ?record aocat:has_native_subject ?native_subject . - ?native_subject skos:broadMatch ?aat . - } - union - { - ?record aocat:has_native_subject ?native_subject . - ?native_subject skos:closeMatch ?aat . - } - union - { - ?record aocat:has_native_subject ?native_subject . - ?native_subject skos:narrowMatch ?aat . + WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_creator ?agent . + } } }; +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: + INSERT { + GRAPH { + ?s aocat:has_owner . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } + } + WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_owner ?agent . + } + } + }; + PREFIX aocat: + PREFIX rdf: + PREFIX rdfs: + INSERT { + GRAPH { + ?s aocat:has_responsible . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } + } + WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_responsible ?agent . + } + } + }; + -#PERIODO ENRICHMENT -INSERT { - GRAPH { - ?temporal aocat:has_period ?periodO . - ?temporal aocat:from ?temporalFrom . - ?temporal aocat:until ?temporalUntil . - } -} -WHERE { - ?temporal aocat:has_native_period ?native_period . - ?native_period skos:prefLabel ?native_label . - optional { - ?periodO skos:altLabel ?native_label . - ?periodO skos:inScheme . - ?periodO time:intervalStartedBy ?intervalStartedBy . - ?intervalStartedBy skos:prefLabel ?temporalFrom . - ?periodO time:intervalFinishedBy ?intervalFinishedBy . - ?intervalFinishedBy skos:prefLabel ?temporalUntil . - } -}; \ No newline at end of file + + PREFIX aocat: + 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 skos: + PREFIX aocat: + 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 rdf: + INSERT { + GRAPH { + ?s aocat:has_language . + skos:prefLabel "und" . + } + } + WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_language ?ns . + } + } + }; + + PREFIX aocat: + PREFIX rdf: + INSERT { + GRAPH { + ?s aocat:has_creator . + 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: + INSERT { + GRAPH { + ?s aocat:has_title "Title not provided" . + } + } + WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_title ?title . + } + } + }; + + + PREFIX skos: + PREFIX aocat: + INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat . + } + } + USING + USING + WHERE { + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:exactMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:broadMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:closeMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:narrowMatch ?aat . + } + }; + + PREFIX skos: + PREFIX aocat: + PREFIX time: + INSERT { + GRAPH { + ?temporal aocat:has_period ?periodO . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } + } + WHERE { + ?temporal aocat:has_native_period ?native_period . + ?native_period skos:prefLabel ?native_label . + optional { + ?periodO skos:altLabel ?native_label . + ?periodO skos:inScheme . + ?periodO time:intervalStartedBy ?intervalStartedBy . + ?intervalStartedBy skos:prefLabel ?temporalFrom . + ?periodO time:intervalFinishedBy ?intervalFinishedBy . + ?intervalFinishedBy skos:prefLabel ?temporalUntil . + } + }; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_836.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_836.sparql index 3c456bb..b921d42 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_836.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_836.sparql @@ -1,183 +1,215 @@ -PREFIX skos: PREFIX aocat: PREFIX rdf: PREFIX rdfs: -PREFIX time: -PREFIX ariadneplus: - -#INSERT DEFAULTS FOR COLLECTION INSERT { GRAPH { - ?s aocat:has_owner . - rdf:type . - rdfs:label "Not provided" . - aocat:has_name "Not provided" . + ?s aocat:has_creator . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } } -} -WHERE { - GRAPH { - ?s rdf:type . - MINUS { + WHERE { + GRAPH { ?s rdf:type . - ?s aocat:has_owner ?agent . + MINUS { + ?s rdf:type . + ?s aocat:has_creator ?agent . + } } - } -}; -INSERT { - GRAPH { - ?s aocat:has_responsible . - rdf:type . - rdfs:label "Not provided" . - aocat:has_name "Not provided" . - } -} -WHERE { - GRAPH { - ?s rdf:type . - MINUS { - ?s rdf:type . - ?s aocat:has_responsible ?agent . - } - } }; +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: + INSERT { + GRAPH { + ?s aocat:has_owner . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } + } + WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_owner ?agent . + } + } + }; + PREFIX aocat: + PREFIX rdf: + PREFIX rdfs: + INSERT { + GRAPH { + ?s aocat:has_responsible . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } + } + WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_responsible ?agent . + } + } + }; + -# INHERIT FROM COLLECTION -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: + 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 . + }; -# INSERT DEFAULTS FOR RECORDS + PREFIX skos: + PREFIX aocat: + 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 rdf: + INSERT { + GRAPH { + ?s aocat:has_language . + skos:prefLabel "und" . + } + } + WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_language ?ns . + } + } + }; + + PREFIX aocat: + PREFIX rdf: + INSERT { + GRAPH { + ?s aocat:has_creator . + 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: + INSERT { + GRAPH { + ?s aocat:has_title "Title not provided" . + } + } + WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_title ?title . + } + } + }; + -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 . - } - } -}; -INSERT { - GRAPH { - ?s aocat:has_language . - skos:prefLabel "und" . - } -} -WHERE { - GRAPH { - ?s rdf:type aocat:AO_Individual_Data_Resource . - MINUS { - ?s rdf:type aocat:AO_Individual_Data_Resource . - ?s aocat:has_language ?ns . - } - } -}; -INSERT { - GRAPH { - ?s aocat:has_creator . - 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 skos: + PREFIX aocat: + INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat . + } + } + USING + USING + WHERE { + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:exactMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:broadMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:closeMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:narrowMatch ?aat . + } + }; -INSERT { - GRAPH { - ?s aocat:has_title "Title not provided" . - } -} -WHERE { - GRAPH { - ?s rdf:type aocat:AO_Individual_Data_Resource . - MINUS { - ?s rdf:type aocat:AO_Individual_Data_Resource . - ?s aocat:has_title ?title . - } - } -}; - - -#AAT ENRICHMENT -INSERT { - GRAPH { - ?record aocat:has_derived_subject ?aat . - } -} -USING -USING -WHERE { - { - ?record aocat:has_native_subject ?native_subject . - ?native_subject skos:exactMatch ?aat . - } - union - { - ?record aocat:has_native_subject ?native_subject . - ?native_subject skos:broadMatch ?aat . - } - union - { - ?record aocat:has_native_subject ?native_subject . - ?native_subject skos:closeMatch ?aat . - } - union - { - ?record aocat:has_native_subject ?native_subject . - ?native_subject skos:narrowMatch ?aat . - } -}; - -#PERIODO ENRICHMENT -INSERT { - GRAPH { - ?temporal aocat:has_period ?periodO . - ?temporal aocat:from ?temporalFrom . - ?temporal aocat:until ?temporalUntil . - } -} -WHERE { - ?temporal aocat:has_native_period ?native_period . - ?native_period skos:prefLabel ?native_label . - optional { - ?periodO skos:altLabel ?native_label . - ?periodO skos:inScheme . - ?periodO time:intervalStartedBy ?intervalStartedBy . - ?intervalStartedBy skos:prefLabel ?temporalFrom . - ?periodO time:intervalFinishedBy ?intervalFinishedBy . - ?intervalFinishedBy skos:prefLabel ?temporalUntil . - } -}; \ No newline at end of file + PREFIX skos: + PREFIX aocat: + PREFIX time: + INSERT { + GRAPH { + ?temporal aocat:has_period ?periodO . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } + } + WHERE { + ?temporal aocat:has_native_period ?native_period . + ?native_period skos:prefLabel ?native_label . + optional { + ?periodO skos:altLabel ?native_label . + ?periodO skos:inScheme . + ?periodO time:intervalStartedBy ?intervalStartedBy . + ?intervalStartedBy skos:prefLabel ?temporalFrom . + ?periodO time:intervalFinishedBy ?intervalFinishedBy . + ?intervalFinishedBy skos:prefLabel ?temporalUntil . + } + }; \ No newline at end of file