diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ASU/ordered_sparql_insert_collection_tdar.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ASU/ordered_sparql_insert_collection_tdar.sparql index 84e3ac8..3107d8f 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ASU/ordered_sparql_insert_collection_tdar.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ASU/ordered_sparql_insert_collection_tdar.sparql @@ -54,4 +54,44 @@ PREFIX skos: ?temporal aocat:until ?until . ?temporal aocat:has_period ?period . } - }; \ No newline at end of file + }; + + PREFIX aocat: + PREFIX skos: + + INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat_subject . + } + } + USING + USING + WHERE { + { + ?record aocat:has_native_subject ?native_subject . + ?aat_native_subject skos:exactMatch ?aat_subject . + bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/TDAR/", ucase(strafter(str(?native_subject),"tDAR/")))) as ?uppercase_native_subject) + filter(?uppercase_native_subject=?aat_native_subject) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?aat_native_subject skos:broadMatch ?aat_subject . + bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/TDAR/", ucase(strafter(str(?native_subject),"tDAR/")))) as ?uppercase_native_subject) + filter(?uppercase_native_subject=?aat_native_subject) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?aat_native_subject skos:closeMatch ?aat_subject . + bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/TDAR/", ucase(strafter(str(?native_subject),"tDAR/")))) as ?uppercase_native_subject) + filter(?uppercase_native_subject=?aat_native_subject) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?aat_native_subject skos:narrowMatch ?aat_subject . + bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/TDAR/", ucase(strafter(str(?native_subject),"tDAR/")))) as ?uppercase_native_subject) + filter(?uppercase_native_subject=?aat_native_subject) + } + }; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CNRS/ordered_sparql_insert_CNRS_archaeo.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CNRS/ordered_sparql_insert_CNRS_archaeo.sparql index d12b4a4..33362f4 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CNRS/ordered_sparql_insert_CNRS_archaeo.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CNRS/ordered_sparql_insert_CNRS_archaeo.sparql @@ -5,6 +5,47 @@ GRAPH +PREFIX rdf: +PREFIX skos: +INSERT DATA{ + GRAPH { + skos:prefLabel "eng" . + skos:prefLabel "fre" . + skos:prefLabel "Fieldwork"@en . + skos:prefLabel "Fieldwork archive"@en . + skos:prefLabel "Fieldwork report"@en . + skos:prefLabel "Site/monument"@en . + skos:prefLabel "Inscription"@en . + skos:prefLabel "Artefact"@en . + skos:prefLabel "collection" . + aocat:has_type . + rdf:type . + skos:prefLabel "collection" + + } +}; + +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +PREFIX skos: +INSERT { + GRAPH { + ?s aocat:has_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 . + } + } +}; + PREFIX aocat: PREFIX rdf: PREFIX rdfs: @@ -101,26 +142,6 @@ WHERE { } }; -PREFIX aocat: -PREFIX rdf: -PREFIX skos: -INSERT DATA{ - GRAPH { - skos:prefLabel "eng" . - skos:prefLabel "fre" . - skos:prefLabel "Fieldwork"@en . - skos:prefLabel "Fieldwork archive"@en . - skos:prefLabel "Fieldwork report"@en . - skos:prefLabel "Site/monument"@en . - skos:prefLabel "Inscription"@en . - skos:prefLabel "Artefact"@en . - skos:prefLabel "collection" . - aocat:has_type . - rdf:type . - skos:prefLabel "collection" - - } -}; PREFIX aocat: PREFIX rdf: @@ -128,8 +149,10 @@ PREFIX rdfs: PREFIX skos: INSERT { GRAPH { - ?s aocat:has_type . - skos:prefLabel "provided record" . + ?s aocat:has_native_subject . + rdf:type aocat:AO_Concept . + rdfs:label "Native subject not provided" . + skos:prefLabel "Native subject not provided" . } } WHERE { @@ -137,7 +160,7 @@ WHERE { ?s rdf:type aocat:AO_Individual_Data_Resource . MINUS { ?s rdf:type aocat:AO_Individual_Data_Resource . - ?s aocat:has_type . + ?s aocat:has_native_subject ?ns . } } }; @@ -148,18 +171,18 @@ PREFIX rdfs: PREFIX skos: INSERT { GRAPH { - ?s aocat:has_native_subject . - rdf:type aocat:AO_Concept . - rdfs:label "Native subject not provided" . - skos:prefLabel "Native subject not provided" . + ?t aocat:has_native_period . + rdf:type aocat:AO_Concept . + rdfs:label "Native period not provided" . + skos:prefLabel "Native period not provided" . } } WHERE { GRAPH { - ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_temporal_coverage ?t . MINUS { - ?s rdf:type aocat:AO_Individual_Data_Resource . - ?s aocat:has_native_subject ?ns . + ?s aocat:has_temporal_coverage ?t . + ?t aocat:has_native_period ?np . } } }; diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/OEAW/ordered_sparql_insert_collection_oeaw.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/OEAW/ordered_sparql_insert_collection_oeaw.sparql deleted file mode 100644 index 7aa6564..0000000 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/OEAW/ordered_sparql_insert_collection_oeaw.sparql +++ /dev/null @@ -1,19 +0,0 @@ -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/OEAW/ordered_sparql_insert_collection_oeaw_arche.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/OEAW/ordered_sparql_insert_collection_oeaw_arche.sparql new file mode 100644 index 0000000..c139042 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/OEAW/ordered_sparql_insert_collection_oeaw_arche.sparql @@ -0,0 +1,77 @@ +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: +DELETE WHERE { +GRAPH { + ?x aocat:from "" . +} +}; + +PREFIX aocat: +DELETE WHERE { +GRAPH { + ?x aocat:until "" . +} +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat . + } +} +USING +USING +WHERE { + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:prefLabel ?native_label . + ?match skos:prefLabel ?matchLabel . + ?match skos:exactMatch ?aat . + FILTER(str(?matchLabel) = ?native_label) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:prefLabel ?native_label . + ?match skos:prefLabel ?matchLabel . + ?match skos:broadMatch ?aat . + FILTER(str(?matchLabel) = ?native_label) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:prefLabel ?native_label . + ?match skos:prefLabel ?matchLabel . + ?match skos:closeMatch ?aat . + FILTER(str(?matchLabel) = ?native_label) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:prefLabel ?native_label . + ?match skos:prefLabel ?matchLabel . + ?match skos:narrowMatch ?aat . + FILTER(str(?matchLabel) = ?native_label) + } +};