diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_TESTv1.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_TESTv1.sparql new file mode 100644 index 0000000..161d947 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_TESTv1.sparql @@ -0,0 +1,147 @@ +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_contributor ?agent . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_contributor ?agent . + MINUS { + ?record aocat:has_contributor ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_responsible ?agent . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_responsible ?agent . + MINUS { + ?record aocat:has_responsible ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_owner ?agent . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_owner ?agent . + MINUS { + ?record aocat:has_owner ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_publisher ?agent . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_publisher ?agent . + MINUS { + ?record aocat:has_publisher ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_access_rights ?ar . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_access_rights ?ar . + MINUS { + ?record aocat:has_access_rights ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_access_policy ?ar . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_access_rights ?ar . + MINUS { + ?record aocat:has_access_policy ?x . + } +}; + +PREFIX aocat: +PREFIX skos: + +INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat . + } +} +USING +USING +WHERE { + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:exactMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:broadMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:closeMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:narrowMatch ?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_native_period ?native_period . + ?native_period skos:prefLabel ?native_label . + GRAPH { + ?periodO skos:altLabel ?native_label . + ?periodO skos:inScheme . + ?periodO time:intervalStartedBy ?intervalStartedBy . + ?intervalStartedBy skos:prefLabel ?temporalFrom . + ?periodO time:intervalFinishedBy ?intervalFinishedBy . + ?intervalFinishedBy skos:prefLabel ?temporalUntil . + } + } + }; + diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_TESTv2.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_TESTv2.sparql new file mode 100644 index 0000000..161d947 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_TESTv2.sparql @@ -0,0 +1,147 @@ +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_contributor ?agent . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_contributor ?agent . + MINUS { + ?record aocat:has_contributor ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_responsible ?agent . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_responsible ?agent . + MINUS { + ?record aocat:has_responsible ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_owner ?agent . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_owner ?agent . + MINUS { + ?record aocat:has_owner ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_publisher ?agent . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_publisher ?agent . + MINUS { + ?record aocat:has_publisher ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_access_rights ?ar . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_access_rights ?ar . + MINUS { + ?record aocat:has_access_rights ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_access_policy ?ar . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_access_rights ?ar . + MINUS { + ?record aocat:has_access_policy ?x . + } +}; + +PREFIX aocat: +PREFIX skos: + +INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat . + } +} +USING +USING +WHERE { + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:exactMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:broadMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:closeMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:narrowMatch ?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_native_period ?native_period . + ?native_period skos:prefLabel ?native_label . + GRAPH { + ?periodO skos:altLabel ?native_label . + ?periodO skos:inScheme . + ?periodO time:intervalStartedBy ?intervalStartedBy . + ?intervalStartedBy skos:prefLabel ?temporalFrom . + ?periodO time:intervalFinishedBy ?intervalFinishedBy . + ?intervalFinishedBy skos:prefLabel ?temporalUntil . + } + } + }; + diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_TESTv3.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_TESTv3.sparql new file mode 100644 index 0000000..52b5a85 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_TESTv3.sparql @@ -0,0 +1,159 @@ +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?record aocat:is_part_of + } +} +USING +WHERE { + ?record rdf:type aocat:AO_Individual_Data_Resource . +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_contributor ?agent . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_contributor ?agent . + MINUS { + ?record aocat:has_contributor ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_responsible ?agent . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_responsible ?agent . + MINUS { + ?record aocat:has_responsible ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_owner ?agent . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_owner ?agent . + MINUS { + ?record aocat:has_owner ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_publisher ?agent . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_publisher ?agent . + MINUS { + ?record aocat:has_publisher ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_access_rights ?ar . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_access_rights ?ar . + MINUS { + ?record aocat:has_access_rights ?x . + } +}; + +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_access_policy ?ar . + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_access_rights ?ar . + MINUS { + ?record aocat:has_access_policy ?x . + } +}; + +PREFIX aocat: +PREFIX skos: + +INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat . + } +} +USING +USING +WHERE { + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:exactMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:broadMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:closeMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:narrowMatch ?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_native_period ?native_period . + ?native_period skos:prefLabel ?native_label . + GRAPH { + ?periodO skos:altLabel ?native_label . + ?periodO skos:inScheme . + ?periodO time:intervalStartedBy ?intervalStartedBy . + ?intervalStartedBy skos:prefLabel ?temporalFrom . + ?periodO time:intervalFinishedBy ?intervalFinishedBy . + ?intervalFinishedBy skos:prefLabel ?temporalUntil . + } + } + }; +