diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_collectionInfo.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_collectionInfo.sparql index 60018e9..34d5c8e 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_collectionInfo.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_collectionInfo.sparql @@ -5,6 +5,23 @@ PREFIX rdfs: INSERT { GRAPH { ?s aocat:was_issued ?created_on . + } +} +USING +WHERE { + ?s rdf:type . + ?s aocat:was_created_on ?created_on . + MINUS { + ?s aocat:was_issued ?iss . + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { ?s aocat:was_modified ?created_on . } } @@ -12,29 +29,12 @@ USING . ?s aocat:was_created_on ?created_on . -}; - -PREFIX aocat: -PREFIX rdf: -PREFIX rdfs: -INSERT { - GRAPH { - ?s aocat:has_temporal_coverage . - rdf:type . - rdfs:label "Not provided" . - - } -} -WHERE { - GRAPH { - ?s rdf:type . - MINUS { - ?s rdf:type . - ?s aocat:has_temporal_coverage ?tc . - } + MINUS { + ?s aocat:was_modified ?date } }; + PREFIX aocat: PREFIX rdf: PREFIX skos: @@ -113,4 +113,67 @@ INSERT { ?s aocat:has_creator ?agent . } } -}; \ No newline at end of file +}; + +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 aocat: + INSERT { + GRAPH { + ?temporal aocat:has_period ?nativePeriod . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } + } + WHERE { + GRAPH { + ?temporal aocat:has_native_period ?nativePeriod . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } + }; + + PREFIX aocat: + PREFIX rdfs: + PREFIX skos: + INSERT { + GRAPH { + ?nativePeriod skos:prefLabel ?periodLabel . + } + } + WHERE { + GRAPH { + ?temporal aocat:has_native_period ?nativePeriod . + ?nativePeriod rdfs:label ?periodLabel . + } + }; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_dendro.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_dendro.sparql new file mode 100644 index 0000000..47cb7fd --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_dendro.sparql @@ -0,0 +1,156 @@ +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:has_creator . + aocat:has_name "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s aocat:has_creator ?creator . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:has_responsible . + aocat:has_name "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s aocat:has_responsible ?agent . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?publisher aocat:has_name ?name . + } +} +WHERE { + GRAPH { + ?record aocat:has_publisher ?publisher . + ?publisher rdfs:label ?name . + MINUS { + ?publisher aocat:has_name ?thename . + } + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:has_publisher ?publisher . + ?publisher ?p ?o . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_publisher ?publisher . + ?publisher ?p ?o . + MINUS { + ?record aocat:has_publisher ?x . + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:has_access_rights "Unknown" + } +} +USING +WHERE { + ?record aocat:is_part_of ?collection . + MINUS { + ?record aocat:has_access_rights ?ar . + } +}; + +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 aocat: + INSERT { + GRAPH { + ?temporal aocat:has_period ?nativePeriod . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } + } + WHERE { + GRAPH { + ?temporal aocat:has_native_period ?nativePeriod . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } + }; + + PREFIX aocat: + PREFIX rdfs: + PREFIX skos: + INSERT { + GRAPH { + ?nativePeriod skos:prefLabel ?periodLabel . + } + } + WHERE { + GRAPH { + ?temporal aocat:has_native_period ?nativePeriod . + ?nativePeriod rdfs:label ?periodLabel . + } + }; + + + + + + + \ No newline at end of file