diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CYI/ordered_sparql_insert_CYI.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CYI/ordered_sparql_insert_CYI.sparql new file mode 100644 index 0000000..ad276cf --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CYI/ordered_sparql_insert_CYI.sparql @@ -0,0 +1,232 @@ +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?record aocat:has_creator ?coll_value . + ?coll_value rdf:type ?type . + ?coll_value rdfs:label ?label . + ?coll_value aocat:has_name ?name . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_creator ?coll_value . + ?coll_value rdf:type ?type . + ?coll_value rdfs:label ?label . + ?coll_value aocat:has_name ?name . + MINUS { + ?record aocat:has_creator ?rec_value . + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?record aocat:has_publisher ?coll_value . + ?coll_value rdf:type ?type . + ?coll_value rdfs:label ?label . + ?coll_value aocat:has_name ?name . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_publisher ?coll_value . + ?coll_value rdf:type ?type . + ?coll_value rdfs:label ?label . + ?coll_value aocat:has_name ?name . + MINUS { + ?record aocat:has_publisher ?rec_value . + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?record aocat:has_owner ?coll_value . + ?coll_value rdf:type ?type . + ?coll_value rdfs:label ?label . + ?coll_value aocat:has_name ?name . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_owner ?coll_value . + ?coll_value rdf:type ?type . + ?coll_value rdfs:label ?label . + ?coll_value aocat:has_name ?name . + MINUS { + ?record aocat:has_owner ?rec_value . + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?record aocat:has_responsible ?coll_value . + ?coll_value rdf:type ?type . + ?coll_value rdfs:label ?label . + ?coll_value aocat:has_name ?name . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_responsible ?coll_value . + ?coll_value rdf:type ?type . + ?coll_value rdfs:label ?label . + ?coll_value aocat:has_name ?name . + MINUS { + ?record aocat:has_responsible ?rec_value . + } +}; + +PREFIX aocat: +PREFIX skos: +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 ?contributor . + } + } +}; + +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat . + } +} +WHERE { + GRAPH { + ?record aocat:has_native_subject ?ns. + GRAPH { + { + ?ns skos:closeMatch ?aat . + } + union + { + ?ns skos:exactMatch ?aat . + } + union + { + ?ns skos:narrowMatch ?aat . + } + union + { + ?ns skos:broadMatch ?aat . + } + } + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +PREFIX rdfs: +PREFIX owl: +PREFIX ariadneplus: +PREFIX time: +PREFIX periodo: +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 . + } + } + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?record aocat:has_spatial_coverage ?spatial . + ?spatial rdf:type aocat:AO_Spatial_Region_Point . + ?spatial rdfs:label ?label . + ?spatial aocat:has_latitude ?lat . + ?spatial aocat:has_longitude ?lon . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_spatial_coverage ?spatial . + ?spatial rdf:type aocat:AO_Spatial_Region_Point . + ?spatial rdfs:label ?label . + ?spatial aocat:has_latitude ?lat . + ?spatial aocat:has_longitude ?lon . +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?record aocat:has_spatial_coverage ?spatial . + ?spatial rdf:type aocat:AO_Spatial_Region . + ?spatial rdfs:label ?label . + ?spatial aocat:has_place_name ?placeName . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_spatial_coverage ?spatial . + ?spatial rdf:type aocat:AO_Spatial_Region . + ?spatial rdfs:label ?label . + ?spatial aocat:has_place_name ?placeName . +}; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CYI/ordered_sparql_insert_CYI_collection.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CYI/ordered_sparql_insert_CYI_collection.sparql index e69de29..6f93588 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CYI/ordered_sparql_insert_CYI_collection.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CYI/ordered_sparql_insert_CYI_collection.sparql @@ -0,0 +1,20 @@ +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +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