clean up enrichment graphs for specific ADS collections
This commit is contained in:
parent
fa5bce3c39
commit
7f39bbf4e9
|
@ -0,0 +1,44 @@
|
|||
#First count how many triples are there
|
||||
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
|
||||
PREFIX ariadneplus: <https://ariadne-infrastructure.eu/aocat/>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
SELECT ?resource ?aat WHERE {
|
||||
|
||||
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::271>{
|
||||
?resource ?p ?o .
|
||||
}
|
||||
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::ads::aatplus>{
|
||||
?resource aocat:has_derived_subject ?aat .
|
||||
}
|
||||
}
|
||||
|
||||
#let's delete them from the aatplus graph for the individual records
|
||||
|
||||
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
WITH <https://ariadne-infrastructure.eu/ariadneplus::ads::aatplus>
|
||||
DELETE {
|
||||
?resource aocat:has_derived_subject ?aat .
|
||||
}
|
||||
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::271>
|
||||
USING <https://ariadne-infrastructure.eu/ariadneplus::ads::aatplus>
|
||||
WHERE {
|
||||
?resource rdf:type aocat:AO_Individual_Data_Resource .
|
||||
?resource aocat:has_derived_subject ?aat .
|
||||
}
|
||||
|
||||
#and now the collection
|
||||
|
||||
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
WITH <https://ariadne-infrastructure.eu/ariadneplus::ads::aatplus>
|
||||
DELETE {
|
||||
?resource aocat:has_derived_subject ?aat .
|
||||
}
|
||||
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::271>
|
||||
USING <https://ariadne-infrastructure.eu/ariadneplus::ads::aatplus>
|
||||
WHERE {
|
||||
|
||||
?resource rdf:type aocat:AO_Collection .
|
||||
?resource aocat:has_derived_subject ?aat .
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
#First count how many triples are there
|
||||
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
|
||||
PREFIX ariadneplus: <https://ariadne-infrastructure.eu/aocat/>
|
||||
SELECT * WHERE {
|
||||
|
||||
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::1093>{
|
||||
?resource aocat:has_temporal_coverage ?temporal .
|
||||
}
|
||||
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::ads::periodoplus>{
|
||||
?temporal aocat:has_period ?period .
|
||||
optional {?temporal aocat:from ?temporalFrom .}
|
||||
optional {?temporal aocat:until ?temporalUntil .}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#let's delete them from the periodoplus graph
|
||||
|
||||
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
|
||||
WITH <https://ariadne-infrastructure.eu/ariadneplus::ads::periodoplus>
|
||||
DELETE {
|
||||
?temporal aocat:has_period ?periodOURI .
|
||||
?temporal aocat:from ?temporalFrom .
|
||||
?temporal aocat:until ?temporalUntil .
|
||||
}
|
||||
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::1093>
|
||||
USING <https://ariadne-infrastructure.eu/ariadneplus::ads::periodoplus>
|
||||
WHERE {
|
||||
?resource aocat:has_temporal_coverage ?temporal .
|
||||
?temporal aocat:has_period ?periodOURI .
|
||||
optional {?temporal aocat:from ?temporalFrom .}
|
||||
optional {?temporal aocat:until ?temporalUntil .}
|
||||
}
|
Loading…
Reference in New Issue