Browse Source

enrichment for ZRC Arkas and its collection, fix for Fasti

new_es_mapping
Enrico Ottonello 10 months ago
parent
commit
a1843bdc7c
  1. 42
      dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/FASTI/ordered_sparql_insert_fasti.sparql
  2. 56
      dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ZRC/ordered_sparql_insert_zrc_Collections.sparql
  3. 168
      dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ZRC/ordered_sparql_insert_zrc_arkas.sparql
  4. 147
      dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ZRC/ordered_sparql_insert_zrc_zbiva.sparql

42
dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/FASTI/ordered_sparql_insert_fasti.sparql

@ -59,8 +59,6 @@ INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::fasti::0> {
?record aocat:has_contributor ?contributor .
?record aocat:has_responsible ?legalResponsible .
?record aocat:has_owner ?owner .
?record aocat:has_publisher ?publisher .
?record aocat:has_access_rights ?accessRights .
?record aocat:has_ARIADNE_subject ?archeologicalResourceType .
}
@ -70,8 +68,6 @@ WHERE {
?record aocat:is_part_of ?collection .
?collection aocat:has_contributor ?contributor .
?collection aocat:has_responsible ?legalResponsible .
?collection aocat:has_owner ?owner .
?collection aocat:has_publisher ?publisher .
?collection aocat:has_access_rights ?accessRights .
?collection aocat:has_ARIADNE_subject ?archeologicalResourceType .
};
@ -209,4 +205,40 @@ WHERE {
?s aocat:has_native_subject ?ns .
}
}
};
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::fasti::0> {
?s aocat:has_title "Title not provided" .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::fasti::0> {
?s rdf:type aocat:AO_Individual_Data_Resource .
MINUS {
?s rdf:type aocat:AO_Individual_Data_Resource .
?s aocat:has_title ?title .
}
}
};
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX time: <http://www.w3.org/2006/time#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::fasti::periodoplus> {
?temporal aocat:has_period ?native_period .
?temporal aocat:from ?from .
?temporal aocat:until ?until .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::fasti::0> {
?temporal aocat:has_native_period ?native_period .
?native_period skos:prefLabel ?native_label .
?temporal aocat:from ?from .
?temporal aocat:until ?until .
}
};

56
dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ZRC/ordered_sparql_insert_zrc_Collections.sparql

@ -0,0 +1,56 @@
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::CollectionInfo> {
?s aocat:was_issued ?created_on .
?s aocat:was_modified ?created_on .
}
}
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::CollectionInfo>
WHERE {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
?s aocat:was_created_on ?created_on .
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::CollectionInfo> {
?s aocat:has_temporal_coverage <https://ariadne-infrastructure.eu/aocat/Time-Span/NOTPROVIDED> .
<https://ariadne-infrastructure.eu/aocat/Time-Span/NOTPROVIDED> rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Temporal_Region> .
<https://ariadne-infrastructure.eu/aocat/Time-Span/NOTPROVIDED> rdfs:label "Not provided" .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::CollectionInfo> {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
MINUS {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
?s aocat:has_temporal_coverage ?tc .
}
}
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::CollectionInfo> {
?s aocat:has_type <https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/collection> .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/collection> rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Concept> .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/collection> skos:prefLabel "collection"
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::CollectionInfo> {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
MINUS {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
?s aocat:has_type ?t .
}
}
};

168
dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ZRC/ordered_sparql_insert_zrc_arkas.sparql

@ -0,0 +1,168 @@
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::zrc_arkas::aatplus> {
?record aocat:has_derived_subject ?aat .
}
}
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::aat>
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::sites>
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 dcterms: <http://purl.org/dc/terms/>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::zrc_arkas::periodo> {
?periodO ?pred ?o .
?o ?pred2 ?o2 .
?o2 ?pred3 ?o3 .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/ariadne/periodo> {
?periodO dcterms:spatial <http://www.wikidata.org/entity/Q215> .
?periodO ?pred ?o .
optional {
?o ?pred2 ?o2 .
optional {
?o2 ?pred3 ?o3 .
}
}
}
};
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX time: <http://www.w3.org/2006/time#>
PREFIX dcterms: <http://purl.org/dc/terms/>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::zrc_arkas::periodoplus> {
?temporal aocat:has_period ?periodO .
?temporal aocat:from ?temporalFrom .
?temporal aocat:until ?temporalUntil .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::sites> {
?temporal aocat:has_native_period ?native_period .
?native_period skos:prefLabel ?native_label .
optional {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::zrc_arkas::periodo> {
?periodO skos:altLabel ?native_label .
?periodO time:intervalStartedBy / time:hasDateTimeDescription / time:year ?temporalFrom .
?periodO time:intervalFinishedBy / time:hasDateTimeDescription / time:year ?temporalUntil .
}
}
}
};
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX ariadneplus: <https://ariadne-infrastructure.eu/aocat/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
insert
{
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::sites> {
?s aocat:was_issued ?year .
}
}
WHERE
{
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::sites> {
?s rdf:type aocat:AO_Individual_Data_Resource .
?s aocat:was_issued ?o .
FILTER(contains(str(?o), "."))
BIND( strdt( strafter(strafter(str(?o),"."),".") , xsd:datetime) AS ?year)
}
};
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX ariadneplus: <https://ariadne-infrastructure.eu/aocat/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
delete {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::sites> {
?s aocat:was_issued ?o .
}
}
where {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::sites> {
?s rdf:type aocat:AO_Individual_Data_Resource .
?s aocat:was_issued ?o .
FILTER(contains(str(?o), "."))
}
};
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX ariadneplus: <https://ariadne-infrastructure.eu/aocat/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
insert
{
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::sites> {
?s aocat:was_modified ?year .
}
}
WHERE
{
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::sites> {
?s rdf:type aocat:AO_Individual_Data_Resource .
?s aocat:was_modified ?o .
FILTER(contains(str(?o), "."))
BIND( strdt( strafter(strafter(str(?o),"."),".") , xsd:datetime) AS ?year)
}
};
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX ariadneplus: <https://ariadne-infrastructure.eu/aocat/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
delete {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::sites> {
?s aocat:was_modified ?o .
}
}
where {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::sites> {
?s rdf:type aocat:AO_Individual_Data_Resource .
?s aocat:was_modified ?o .
FILTER(contains(str(?o), "."))
}
};

147
dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ZRC/ordered_sparql_insert_zrc_zbiva.sparql

@ -0,0 +1,147 @@
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::CollectionInfo> {
?s aocat:was_issued ?created_on .
?s aocat:was_modified ?created_on .
}
}
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::CollectionInfo>
WHERE {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
?s aocat:was_created_on ?created_on .
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::CollectionInfo> {
?s aocat:has_temporal_coverage <https://ariadne-infrastructure.eu/aocat/Time-Span/NOTPROVIDED> .
<https://ariadne-infrastructure.eu/aocat/Time-Span/NOTPROVIDED> rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Temporal_Region> .
<https://ariadne-infrastructure.eu/aocat/Time-Span/NOTPROVIDED> rdfs:label "Not provided" .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::CollectionInfo> {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
MINUS {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
?s aocat:has_temporal_coverage ?tc .
}
}
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::CollectionInfo> {
?s aocat:has_type <https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/collection> .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/collection> rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Concept> .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/collection> skos:prefLabel "collection"
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::CollectionInfo> {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
MINUS {
?s rdf:type <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection> .
?s aocat:has_type ?t .
}
}
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_zbiva::sites> {
?coll ?p ?value
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_arkas::CollectionInfo> {
?coll ?p ?value .
?coll aocat:has_original_id ?id .
}
FILTER(?id="Zbiva")
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::zrc_zbiva::aatplus> {
?record aocat:has_derived_subject ?aat .
}
}
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_zbiva::aat>
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_zbiva::sites>
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 dcterms: <http://purl.org/dc/terms/>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::zrc_zbiva::periodo> {
?periodO ?pred ?o .
?o ?pred2 ?o2 .
?o2 ?pred3 ?o3 .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/ariadne/periodo> {
?periodO dcterms:spatial <http://www.wikidata.org/entity/Q215> .
?periodO ?pred ?o .
optional {
?o ?pred2 ?o2 .
optional {
?o2 ?pred3 ?o3 .
}
}
}
};
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX time: <http://www.w3.org/2006/time#>
PREFIX dcterms: <http://purl.org/dc/terms/>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::zrc_zbiva::periodoplus> {
?temporal aocat:has_period ?periodO .
?temporal aocat:from ?temporalFrom .
?temporal aocat:until ?temporalUntil .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::zrc_zbiva::sites> {
?temporal aocat:has_native_period ?native_period .
?native_period skos:prefLabel ?native_label .
optional {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::zrc_zbiva::periodo> {
?periodO skos:altLabel ?native_label .
?periodO time:intervalStartedBy / time:hasDateTimeDescription / time:year ?temporalFrom .
?periodO time:intervalFinishedBy / time:hasDateTimeDescription / time:year ?temporalUntil .
}
}
}
};
Loading…
Cancel
Save