diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/IAVP/ordered_sparql_insert_IAVP_farms.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/IAVP/ordered_sparql_insert_IAVP_farms.sparql new file mode 100644 index 0000000..0d434d3 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/IAVP/ordered_sparql_insert_IAVP_farms.sparql @@ -0,0 +1,107 @@ +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:was_issued ?issued . + ?record aocat:was_modified ?modified . + ?record aocat:has_responsible ?legalResponsible . + ?legalResponsible aocat:has_name ?resp . + ?record aocat:has_owner ?owner . + ?owner aocat:has_name ?own . + ?record aocat:has_access_rights ?accessRights . + ?record aocat:has_language ?lang . + ?lang skos:prefLabel ?langL + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_original_id "Communist agricultural system db" . + ?collection aocat:was_issued ?issued . + ?collection aocat:was_modified ?modified . + ?collection aocat:has_responsible ?legalResponsible . + ?legalResponsible aocat:has_name ?resp . + ?collection aocat:has_owner ?owner . + ?owner aocat:has_name ?own . + ?collection aocat:has_access_rights ?accessRights . + ?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 skos: + +INSERT { + GRAPH { + ?record aocat:has_derived_subject ?derived_subject . + } +} +USING +WHERE { + { + ?record aocat:has_derived_subject ?derived_subject . + } +}; + +PREFIX aocat: +PREFIX skos: + +INSERT { + GRAPH { + ?derived_subject skos:prefLabel ?dslabel . + } +} +USING +WHERE { + { + ?record aocat:has_derived_subject ?derived_subject . + ?derived_subject skos:prefLabel ?dslabel . + } +}; + +PREFIX skos: +PREFIX aocat: +PREFIX time: +PREFIX dcterms: +PREFIX periodo: +INSERT { +GRAPH { + ?temporal aocat:has_period ?periodO . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . +} +} +WHERE { +GRAPH { + ?temporal aocat:has_period ?periodO . + optional { + GRAPH { + ?periodO skos:altLabel ?native_label . + ?periodO time:intervalStartedBy / time:hasDateTimeDescription / periodo:earliestYear ?temporalFrom . + ?periodO time:intervalFinishedBy / time:hasDateTimeDescription / time:year ?temporalUntil . + } + } + } +}; \ No newline at end of file