From a632f5f6866e7b1cf21762f9d6b44c653ca13bf2 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Fri, 29 Jul 2022 10:03:25 +0200 Subject: [PATCH 1/3] enrichment query for UIBK --- ...dered_sparql_insert_UIBK_Collection.sparql | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/UIBK/ordered_sparql_insert_UIBK_Collection.sparql diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/UIBK/ordered_sparql_insert_UIBK_Collection.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/UIBK/ordered_sparql_insert_UIBK_Collection.sparql new file mode 100644 index 0000000..f20dc09 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/UIBK/ordered_sparql_insert_UIBK_Collection.sparql @@ -0,0 +1,119 @@ +PREFIX aocat: +PREFIX skos: +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 ?o . + } + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_type . + rdf:type . + skos:prefLabel "collection" + + } +} +WHERE { + GRAPH { + ?s rdf:type . + } +}; + +PREFIX skos: +INSERT DATA{ +GRAPH { + skos:prefLabel "de" . + skos:prefLabel "en" . + skos:prefLabel "Site/monument"@en . + skos:prefLabel "Fieldwork archive"@en . +} +}; + +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_part ?x + + } +} +WHERE { + GRAPH { + ?x aocat:is_part_of ?s + } +}; + +PREFIX aocat: +PREFIX skos: +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 ?o . + } + } +}; + + +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat . + } +} +WHERE { + GRAPH { + ?record aocat:has_derived_subject ?aat . + } +}; + + PREFIX skos: + PREFIX aocat: + PREFIX time: + INSERT { + GRAPH { + ?temporal aocat:has_period ?periodO . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } + } + WHERE { + GRAPH { + ?temporal aocat:has_period ?periodO . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } +}; From 74a2028d428d91865d0dc12ca01fe1f5bb0c6197 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Fri, 29 Jul 2022 10:04:25 +0200 Subject: [PATCH 2/3] also the label of the language is mandatory --- .../sparql/check_missing_mandatory_coll_fields.sparql | 2 ++ .../sparql/check_missing_mandatory_record_fields.sparql | 1 + 2 files changed, 3 insertions(+) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/check_missing_mandatory_coll_fields.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/check_missing_mandatory_coll_fields.sparql index d226cb2..0a0ee3f 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/check_missing_mandatory_coll_fields.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/check_missing_mandatory_coll_fields.sparql @@ -17,6 +17,7 @@ SELECT * WHERE { MINUS { ?s rdf:type . ?s aocat:has_ARIADNE_subject ?ariadneSubject . + ?ariadneSubject skos:prefLabel ?archeologicalResourceTypeName . } } UNION { @@ -66,6 +67,7 @@ SELECT * WHERE { MINUS { ?s rdf:type . ?s aocat:has_language ?language . + ?language skos:prefLabel ?x . } } UNION{ diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/check_missing_mandatory_record_fields.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/check_missing_mandatory_record_fields.sparql index 3f0a66e..92423af 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/check_missing_mandatory_record_fields.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/check_missing_mandatory_record_fields.sparql @@ -66,6 +66,7 @@ SELECT DISTINCT ?g WHERE { MINUS { ?s rdf:type . ?s aocat:has_language ?l . + ?l skos:prefLabel ?label . } } UNION{ From 4666063dcfedd5e09beb744ceaee3ffb9d5ffbe1 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Fri, 29 Jul 2022 15:47:38 +0200 Subject: [PATCH 3/3] updated enrich for UIBK --- ...dered_sparql_insert_UIBK_Collection.sparql | 52 ++++--------------- 1 file changed, 10 insertions(+), 42 deletions(-) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/UIBK/ordered_sparql_insert_UIBK_Collection.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/UIBK/ordered_sparql_insert_UIBK_Collection.sparql index f20dc09..640ff48 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/UIBK/ordered_sparql_insert_UIBK_Collection.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/UIBK/ordered_sparql_insert_UIBK_Collection.sparql @@ -3,7 +3,7 @@ PREFIX skos: PREFIX rdf: PREFIX rdfs: INSERT { - GRAPH { + GRAPH { ?s aocat:has_owner . rdf:type . rdfs:label "Not provided" . @@ -11,7 +11,7 @@ INSERT { } } WHERE { - GRAPH { + GRAPH { ?s rdf:type . MINUS { ?s rdf:type . @@ -25,7 +25,7 @@ PREFIX skos: PREFIX rdf: PREFIX rdfs: INSERT { - GRAPH { + GRAPH { ?s aocat:has_type . rdf:type . skos:prefLabel "collection" @@ -33,14 +33,14 @@ INSERT { } } WHERE { - GRAPH { + GRAPH { ?s rdf:type . } }; PREFIX skos: INSERT DATA{ -GRAPH { +GRAPH { skos:prefLabel "de" . skos:prefLabel "en" . skos:prefLabel "Site/monument"@en . @@ -53,13 +53,13 @@ PREFIX skos: PREFIX rdf: PREFIX rdfs: INSERT { - GRAPH { + GRAPH { ?s aocat:has_part ?x } } WHERE { - GRAPH { + GRAPH { ?x aocat:is_part_of ?s } }; @@ -69,7 +69,7 @@ PREFIX skos: PREFIX rdf: PREFIX rdfs: INSERT { - GRAPH { + GRAPH { ?s aocat:has_owner . rdf:type . rdfs:label "Not provided" . @@ -77,43 +77,11 @@ INSERT { } } WHERE { - GRAPH { + GRAPH { ?s rdf:type . MINUS { ?s rdf:type . ?s aocat:has_owner ?o . } } -}; - - -PREFIX aocat: -PREFIX skos: -INSERT { - GRAPH { - ?record aocat:has_derived_subject ?aat . - } -} -WHERE { - GRAPH { - ?record aocat:has_derived_subject ?aat . - } -}; - - PREFIX skos: - PREFIX aocat: - PREFIX time: - INSERT { - GRAPH { - ?temporal aocat:has_period ?periodO . - ?temporal aocat:from ?temporalFrom . - ?temporal aocat:until ?temporalUntil . - } - } - WHERE { - GRAPH { - ?temporal aocat:has_period ?periodO . - ?temporal aocat:from ?temporalFrom . - ?temporal aocat:until ?temporalUntil . - } -}; +}; \ No newline at end of file