Skip to content

Commit

Permalink
GH-384 - Add getty direct ld search and term retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisrlc committed Oct 4, 2023
1 parent 4104461 commit 34b0f19
Show file tree
Hide file tree
Showing 2 changed files with 426 additions and 0 deletions.
83 changes: 83 additions & 0 deletions config/authorities/linked_data/getty_direct.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"QA_CONFIG_VERSION": "2.2",
"prefixes": {
"getty": "http://vocab.getty.edu/ontology#"
},
"term": {
"url": {
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
"@type": "IriTemplate",
"template": "https://vocab.getty.edu/{subauth}/{term_id}",
"variableRepresentation": "BasicRepresentation",
"mapping": [
{
"@type": "IriTemplateMapping",
"variable": "term_id",
"property": "hydra:freetextQuery",
"required": true,
"encode": true
},
{
"@type": "IriTemplateMapping",
"variable": "subauth",
"property": "hydra:freetextQuery",
"required": true
}
]
},
"qa_replacement_patterns": {
"term_id": "term_id",
"subauth": "subauth"
},
"term_id": "ID",
"results": {
"id_ldpath": "dc:identifier :: xsd:string",
"label_ldpath": "skos:prefLabel :: xsd:string",
"altlabel_ldpath": "skos:altLabel :: xsd:string",
"broader_ldpath": "skos:broader :: xsd:anyURI",
"narrower_ldpath": "skos:narrower :: xsd:anyURI",
"sameas_ldpath": "skos:exactMatch :: xsd:anyURI"
},
"subauthorities": {
"aat": "aat",
"tgn": "tgn",
"ulan": "ulan"
}
},
"search": {
"url": {
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
"@type": "IriTemplate",
"template": "https://vocab.getty.edu/sparql.rdf?query=CONSTRUCT+%7B%0A++%3Fs+dc%3Aidentifier+%3Fid+%3B%0A+++++skos%3AprefLabel+%3FprefLabel+.%0A%7D%0AWHERE+%7B%0A++%3Fs+a+skos%3AConcept+%3B%0A+++++++luc%3Aterm+%22{query}%22%3B%0A+++++++skos%3AinScheme+{subauth}%3A+%3B%0A+++++++skos%3AprefLabel+%3FprefLabel+.%0A++%3Fs+dc%3Aidentifier+%3Fid+.%0A++BIND%28REPLACE%28%22{query}%22%2C+%22%5B%2C*%28%29%5D%22%2C+%22%22%2C+%22i%22%29+AS+%3Fnq%29+.%0A++BIND%28REPLACE%28%3Fnq%2C+%22%5C%5Cs%2B%5C%5CS%2B%22%2C+%22%22%2C+%22i%22%29+AS+%3Fnq1%29+.%0A++BIND%28REPLACE%28%3Fnq%2C+CONCAT%28%3Fnq1%2C+%22%5C%5Cs%2B%22%29%2C+%22%22%2C+%22i%22%29+AS+%3Fnq1_rest%29+.%0A++BIND%28REPLACE%28%3Fnq1_rest%2C+%22%5C%5Cs%2B%5C%5CS%2B%22%2C+%22%22%2C+%22i%22%29+AS+%3Fnq2%29+.%0A++BIND%28REPLACE%28%3Fnq1_rest%2C+CONCAT%28%3Fnq2%2C+%22%5C%5Cs%2B%22%29%2C+%22%22%2C+%22i%22%29+AS+%3Fnq2_rest%29+.%0A++BIND%28REPLACE%28%3Fnq2_rest%2C+%22%5C%5Cs%2B%5C%5CS%2B%22%2C+%22%22%2C+%22i%22%29+AS+%3Fnq3%29+.%0A++FILTER+regex%28str%28%3FprefLabel%29%2C+CONCAT%28%22%28%3F%3D.*%22%2C+%3Fnq1%2C+%22%29%28%3F%3D.*%22%2C+%3Fnq2%2C+%22%29%28%3F%3D.*%22%2C+%3Fnq3%2C+%22%29%22%29%2C+%22i%22%29+.%0A%7D+ORDER+BY+asc%28lcase%28str%28%3FprefLabel%29%29%29&_implicit=false&implicit=true&_equivalent=false&_form=%2Fsparql",
"variableRepresentation": "BasicRepresentation",
"mapping": [
{
"@type": "IriTemplateMapping",
"variable": "query",
"property": "hydra:freetextQuery",
"required": true,
"encode": true
},
{
"@type": "IriTemplateMapping",
"variable": "subauth",
"property": "hydra:freetextQuery",
"required": true
}
]
},
"qa_replacement_patterns": {
"query": "query",
"subauth": "subauth"
},
"results": {
"id_ldpath": "dc:identifier :: xsd:string",
"label_ldpath": "skos:prefLabel :: xsd:string"
},
"subauthorities": {
"aat": "aat",
"tgn": "tgn",
"ulan": "ulan"
}
}
}
Loading

0 comments on commit 34b0f19

Please sign in to comment.