From cd6630882747e7dcdf69eebcf4a07b810bc292eb Mon Sep 17 00:00:00 2001 From: Enrico Ottonello Date: Sun, 31 Jan 2021 10:51:39 +0100 Subject: [PATCH] enrichment for DANS --- ...d_sparql_insert_dans_collectionInfo.sparql | 116 +++++++++++ .../ordered_sparql_insert_dans_easy.sparql | 191 ++++++++++++++++++ 2 files changed, 307 insertions(+) create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_collectionInfo.sparql create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_easy.sparql diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_collectionInfo.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_collectionInfo.sparql new file mode 100644 index 0000000..60018e9 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_collectionInfo.sparql @@ -0,0 +1,116 @@ +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 . + ?s aocat:was_created_on ?created_on . +}; + +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 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 . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +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: +INSERT { + GRAPH { + ?s aocat:has_contributor . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_contributor ?agent . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +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 . + } + } +}; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_easy.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_easy.sparql new file mode 100644 index 0000000..37f10a6 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_easy.sparql @@ -0,0 +1,191 @@ +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:has_responsible ?legalResponsible . + ?record aocat:has_owner ?owner . + ?record aocat:has_publisher ?publisher . + ?record aocat:has_ARIADNE_subject ?archeologicalResourceType . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_responsible ?legalResponsible . + ?collection aocat:has_owner ?owner . + ?collection aocat:has_publisher ?publisher . + ?collection aocat:has_ARIADNE_subject ?archeologicalResourceType . +}; + +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_Individual_Data_Resource . + ?s aocat:was_created_on ?created_on . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:was_issued ?issued . + } +}; + +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 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 . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_contributor . + 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_contributor ?agent . + } + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:was_modified ?issued . + } +} +USING +WHERE { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:was_created_on ?created_on . + ?s aocat:was_issued ?issued . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:was_created_on ?created_on . + ?s aocat:was_issued ?issued . + ?s aocat:was_modified ?modified . + } +}; + +PREFIX aocat: +PREFIX skos: +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 dcterms: +INSERT { + GRAPH { + ?periodO ?pred ?o . + ?o ?pred2 ?o2 . + ?o2 ?pred3 ?o3 . + } + } + WHERE { + GRAPH { + ?periodO dcterms:spatial . + ?periodO ?pred ?o . + optional { + ?o ?pred2 ?o2 . + optional { + ?o2 ?pred3 ?o3 . + } + } + } + }; + +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