enrich queries for tdar, CNRS, and ARCHE

This commit is contained in:
Alessia Bardi 2022-09-30 14:44:49 +02:00
parent 77137414cd
commit 2a2dd374fa
4 changed files with 171 additions and 50 deletions

View File

@ -54,4 +54,44 @@ PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
?temporal aocat:until ?until .
?temporal aocat:has_period ?period .
}
};
};
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::tdar::aatplus> {
?record aocat:has_derived_subject ?aat_subject .
}
}
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::tdar::aat>
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::tdar::CollectionInfo>
WHERE {
{
?record aocat:has_native_subject ?native_subject .
?aat_native_subject skos:exactMatch ?aat_subject .
bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/TDAR/", ucase(strafter(str(?native_subject),"tDAR/")))) as ?uppercase_native_subject)
filter(?uppercase_native_subject=?aat_native_subject)
}
union
{
?record aocat:has_native_subject ?native_subject .
?aat_native_subject skos:broadMatch ?aat_subject .
bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/TDAR/", ucase(strafter(str(?native_subject),"tDAR/")))) as ?uppercase_native_subject)
filter(?uppercase_native_subject=?aat_native_subject)
}
union
{
?record aocat:has_native_subject ?native_subject .
?aat_native_subject skos:closeMatch ?aat_subject .
bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/TDAR/", ucase(strafter(str(?native_subject),"tDAR/")))) as ?uppercase_native_subject)
filter(?uppercase_native_subject=?aat_native_subject)
}
union
{
?record aocat:has_native_subject ?native_subject .
?aat_native_subject skos:narrowMatch ?aat_subject .
bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/TDAR/", ucase(strafter(str(?native_subject),"tDAR/")))) as ?uppercase_native_subject)
filter(?uppercase_native_subject=?aat_native_subject)
}
};

View File

@ -5,6 +5,47 @@ GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::openarchaeo
}
};
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 DATA{
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::openarchaeo::ttl> {
<http://lexvo.org/id/iso639-2/eng> skos:prefLabel "eng" .
<http://lexvo.org/id/iso639-2/fra> skos:prefLabel "fre" .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Subject/Fieldwork> skos:prefLabel "Fieldwork"@en .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Subject/Fieldwork%20archive> skos:prefLabel "Fieldwork archive"@en .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Subject/Fieldwork%20report> skos:prefLabel "Fieldwork report"@en .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Subject/Site%2Fmonument> skos:prefLabel "Site/monument"@en .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Subject/Inscription> skos:prefLabel "Inscription"@en .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Subject/Artefact> skos:prefLabel "Artefact"@en .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/Collection> skos:prefLabel "collection" .
<http://openarchaeo.huma-num.fr> 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"
}
};
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 skos: <http://www.w3.org/2004/02/skos/core#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::openarchaeo::ttl> {
?s aocat:has_type <https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/provided%20record> .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/provided%20record> skos:prefLabel "provided record" .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::openarchaeo::ttl> {
?s rdf:type aocat:AO_Individual_Data_Resource .
MINUS {
?s rdf:type aocat:AO_Individual_Data_Resource .
?s aocat:has_type <https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/provided%20record> .
}
}
};
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#>
@ -101,26 +142,6 @@ WHERE {
}
};
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 DATA{
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::openarchaeo::ttl> {
<http://lexvo.org/id/iso639-2/eng> skos:prefLabel "eng" .
<http://lexvo.org/id/iso639-2/fra> skos:prefLabel "fre" .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Subject/Fieldwork> skos:prefLabel "Fieldwork"@en .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Subject/Fieldwork%20archive> skos:prefLabel "Fieldwork archive"@en .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Subject/Fieldwork%20report> skos:prefLabel "Fieldwork report"@en .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Subject/Site%2Fmonument> skos:prefLabel "Site/monument"@en .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Subject/Inscription> skos:prefLabel "Inscription"@en .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Subject/Artefact> skos:prefLabel "Artefact"@en .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/Collection> skos:prefLabel "collection" .
<http://openarchaeo.huma-num.fr> 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"
}
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
@ -128,8 +149,10 @@ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::openarchaeo::ttl> {
?s aocat:has_type <https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/provided%20record> .
<https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/provided%20record> skos:prefLabel "provided record" .
?s aocat:has_native_subject <https://ariadne-infrastructure.eu/aocat/Concept/Subject/NOTPROVIDED> .
<https://ariadne-infrastructure.eu/aocat/Concept/Subject/NOTPROVIDED> rdf:type aocat:AO_Concept .
<https://ariadne-infrastructure.eu/aocat/Concept/Subject/NOTPROVIDED> rdfs:label "Native subject not provided" .
<https://ariadne-infrastructure.eu/aocat/Concept/Subject/NOTPROVIDED> skos:prefLabel "Native subject not provided" .
}
}
WHERE {
@ -137,7 +160,7 @@ WHERE {
?s rdf:type aocat:AO_Individual_Data_Resource .
MINUS {
?s rdf:type aocat:AO_Individual_Data_Resource .
?s aocat:has_type <https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/provided%20record> .
?s aocat:has_native_subject ?ns .
}
}
};
@ -148,18 +171,18 @@ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::openarchaeo::ttl> {
?s aocat:has_native_subject <https://ariadne-infrastructure.eu/aocat/Concept/NOTPROVIDED> .
<https://ariadne-infrastructure.eu/aocat/Concept/NOTPROVIDED> rdf:type aocat:AO_Concept .
<https://ariadne-infrastructure.eu/aocat/Concept/NOTPROVIDED> rdfs:label "Native subject not provided" .
<https://ariadne-infrastructure.eu/aocat/Concept/NOTPROVIDED> skos:prefLabel "Native subject not provided" .
?t aocat:has_native_period <https://ariadne-infrastructure.eu/aocat/Concept/NativePeriod/NOTPROVIDED> .
<https://ariadne-infrastructure.eu/aocat/Concept/NativePeriod/NOTPROVIDED> rdf:type aocat:AO_Concept .
<https://ariadne-infrastructure.eu/aocat/Concept/NativePeriod/NOTPROVIDED> rdfs:label "Native period not provided" .
<https://ariadne-infrastructure.eu/aocat/Concept/NativePeriod/NOTPROVIDED> skos:prefLabel "Native period not provided" .
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::openarchaeo::ttl> {
?s rdf:type aocat:AO_Individual_Data_Resource .
?s aocat:has_temporal_coverage ?t .
MINUS {
?s rdf:type aocat:AO_Individual_Data_Resource .
?s aocat:has_native_subject ?ns .
?s aocat:has_temporal_coverage ?t .
?t aocat:has_native_period ?np .
}
}
};

View File

@ -1,19 +0,0 @@
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::oeaw::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::oeaw::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 .
}
}
};

View File

@ -0,0 +1,77 @@
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::arche::oai> {
?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::arche::oai> {
?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/>
DELETE WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> {
?x aocat:from "" .
}
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
DELETE WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai> {
?x aocat:until "" .
}
};
PREFIX aocat: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX ariadneplus: <https://ariadne-infrastructure.eu/aocat/>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/ariadneplus::arche::aatplus> {
?record aocat:has_derived_subject ?aat .
}
}
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::aat>
USING <https://ariadne-infrastructure.eu/api_________::ariadne_plus::arche::oai>
WHERE {
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:prefLabel ?native_label .
?match skos:prefLabel ?matchLabel .
?match skos:exactMatch ?aat .
FILTER(str(?matchLabel) = ?native_label)
}
union
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:prefLabel ?native_label .
?match skos:prefLabel ?matchLabel .
?match skos:broadMatch ?aat .
FILTER(str(?matchLabel) = ?native_label)
}
union
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:prefLabel ?native_label .
?match skos:prefLabel ?matchLabel .
?match skos:closeMatch ?aat .
FILTER(str(?matchLabel) = ?native_label)
}
union
{
?record aocat:has_native_subject ?native_subject .
?native_subject skos:prefLabel ?native_label .
?match skos:prefLabel ?matchLabel .
?match skos:narrowMatch ?aat .
FILTER(str(?matchLabel) = ?native_label)
}
};