diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/BMPAS/ordered_sparql_insert_bmpas_artefacts.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/BMPAS/ordered_sparql_insert_bmpas_artefacts.sparql new file mode 100644 index 0000000..c169329 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/BMPAS/ordered_sparql_insert_bmpas_artefacts.sparql @@ -0,0 +1,159 @@ +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:has_contributor ?contributor . + ?contributor aocat:has_name ?contrib . + ?record aocat:has_responsible ?legalResponsible . + ?legalResponsible aocat:has_name ?resp . + ?record aocat:has_owner ?owner . + ?owner aocat:has_name ?own . + ?record aocat:has_publisher ?publisher . + ?publisher aocat:has_name ?pub . + ?record aocat:has_creator ?creator . + ?creator aocat:has_name ?cre . + ?record aocat:has_access_rights ?accessRights . + ?record aocat:has_access_policy ?accessPolicy . + ?record aocat:has_language ?lang . + ?lang skos:prefLabel ?langL + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_contributor ?contributor . + ?contributor aocat:has_name ?contrib . + ?collection aocat:has_responsible ?legalResponsible . + ?legalResponsible aocat:has_name ?resp . + ?collection aocat:has_owner ?owner . + ?owner aocat:has_name ?own . + ?collection aocat:has_publisher ?publisher . + ?publisher aocat:has_name ?pub . + ?collection aocat:has_creator ?creator . + ?creator aocat:has_name ?cre . + ?collection aocat:has_access_rights ?accessRights . + ?collection aocat:has_access_policy ?accessPolicy . + ?collection aocat:has_language ?lang . + ?lang skos:prefLabel ?langL +}; + +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: +INSERT { + GRAPH { + ?s aocat:was_modified ?issued . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:was_issued ?issued . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:was_modified ?modified . + } + } +}; + +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: +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 aocat: +INSERT { + GRAPH { + ?record aocat:has_visual_component ?primary_visual_component . + } +} +USING +WHERE { + ?record aocat:has_primary_visual_component ?primary_visual_component . + MINUS { + ?record aocat:has_visual_component ?visual_component . + } +}; + +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 ?t_label . + optional { + GRAPH { + ?periodO skos:altLabel ?p_label . + ?periodO time:intervalStartedBy / time:hasDateTimeDescription / time:year ?temporalFrom . + ?periodO time:intervalFinishedBy / time:hasDateTimeDescription / time:year ?temporalUntil . + } + } + bind(ucase(?t_label) as ?u_t_label) + bind(ucase(?p_label) as ?u_p_label) + filter(?u_t_label=?u_p_label) + } + }; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/BMPAS/ordered_sparql_insert_bmpas_coins.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/BMPAS/ordered_sparql_insert_bmpas_coins.sparql new file mode 100644 index 0000000..66065e0 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/BMPAS/ordered_sparql_insert_bmpas_coins.sparql @@ -0,0 +1,159 @@ +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:has_contributor ?contributor . + ?contributor aocat:has_name ?contrib . + ?record aocat:has_responsible ?legalResponsible . + ?legalResponsible aocat:has_name ?resp . + ?record aocat:has_owner ?owner . + ?owner aocat:has_name ?own . + ?record aocat:has_publisher ?publisher . + ?publisher aocat:has_name ?pub . + ?record aocat:has_creator ?creator . + ?creator aocat:has_name ?cre . + ?record aocat:has_access_rights ?accessRights . + ?record aocat:has_access_policy ?accessPolicy . + ?record aocat:has_language ?lang . + ?lang skos:prefLabel ?langL + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_contributor ?contributor . + ?contributor aocat:has_name ?contrib . + ?collection aocat:has_responsible ?legalResponsible . + ?legalResponsible aocat:has_name ?resp . + ?collection aocat:has_owner ?owner . + ?owner aocat:has_name ?own . + ?collection aocat:has_publisher ?publisher . + ?publisher aocat:has_name ?pub . + ?collection aocat:has_creator ?creator . + ?creator aocat:has_name ?cre . + ?collection aocat:has_access_rights ?accessRights . + ?collection aocat:has_access_policy ?accessPolicy . + ?collection aocat:has_language ?lang . + ?lang skos:prefLabel ?langL +}; + +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: +INSERT { + GRAPH { + ?s aocat:was_modified ?issued . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:was_issued ?issued . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:was_modified ?modified . + } + } +}; + +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: +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 aocat: +INSERT { + GRAPH { + ?record aocat:has_visual_component ?primary_visual_component . + } +} +USING +WHERE { + ?record aocat:has_primary_visual_component ?primary_visual_component . + MINUS { + ?record aocat:has_visual_component ?visual_component . + } +}; + +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 ?t_label . + optional { + GRAPH { + ?periodO skos:altLabel ?p_label . + ?periodO time:intervalStartedBy / time:hasDateTimeDescription / time:year ?temporalFrom . + ?periodO time:intervalFinishedBy / time:hasDateTimeDescription / time:year ?temporalUntil . + } + } + bind(ucase(?t_label) as ?u_t_label) + bind(ucase(?p_label) as ?u_p_label) + filter(?u_t_label=?u_p_label) + } + }; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/BMPAS/ordered_sparql_insert_bmpas_coinsCollectionInfo.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/BMPAS/ordered_sparql_insert_bmpas_coinsCollectionInfo.sparql new file mode 100644 index 0000000..10d4dd5 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/BMPAS/ordered_sparql_insert_bmpas_coinsCollectionInfo.sparql @@ -0,0 +1,19 @@ +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 . + } + } +};