Pilot implementation for the NDE Termennetwerk created for the CLARIAH Techdag November 30, 2018.
Got a question about this pilot? Please contact us!
$ mvn build
$ mvn "-Dexec.args=-Dnde.config=`pwd`/conf/termennetwerk.xml -classpath %classpath nl.knaw.huc.di.nde.Main" -Dexec.executable=java org.codehaus.mojo:exec-maven-plugin:1.5.0:exec
or via docker:
$ docker build -t nde-termennetwerk .
$ docker run --rm -it -p 8080:8080 nde-termennetwerk
- GraphQL endpoint: http://localhost:8080/nde/graphql
- GraphiQL endpoint: http://localhost:8080/static/graphiql/index.html
The GraphiQL endpoint is hardwired to the NDE Termennetwerk GraphQL endpoint and supports autocomplete.
Example queries:
query { terms(match:"*Dutch*",dataset:["clavas"]) { dataset terms {uri, prefLabel} } }
# Example: Gemeenschappelijke Thesaurus Audiovisuele Archieven (GTAA) en Wikidata
query {
terms(match:"*fietsen*" dataset:["gtaa","wikidata"]) { dataset terms {uri prefLabel altLabel} }
}
# Example: Nederlandse Thesaurus van Auteursnamen (NTA)
query {
terms(match:"wolkers" dataset:["nta"] ) {
dataset label terms { uri prefLabel altLabel definition scopeNote }
}
}
# Example: Cultuurhistorische Thesaurus (CHT) en Volkenkundige Thesaurus (SVCN)
query {
terms(match:"amerika" dataset:["cht","svcn"]) {
dataset terms {uri prefLabel altLabel scopeNote}
}
}
# Example: WO2 Thesaurus
query {
terms(match:"bezetting" dataset:["wo2"] ) {
dataset label terms { uri prefLabel altLabel definition scopeNote }
}
}
# Example: AAT Thesaurus
query {
terms(match:"wiel*" dataset:["aat"] ) {
dataset label terms { uri prefLabel altLabel definition scopeNote }
}
}
# Example: Stichting Omroep Muziek Termen
query {
terms(match:"cello" dataset:["som"] ) {
dataset label terms { uri prefLabel scopeNote }
}
}
# Example: Stichting Omroep Muziek Termen
query {
terms(match:"cello" dataset:["som"] ) {
dataset label terms { uri prefLabel scopeNote }
}
}
# Example for the "Virtuele Thesaurus voor Mode en Kostuums"
query {
terms(match:"overjas" dataset:[ "vtmk"] ) {
dataset label terms { uri prefLabel scopeNote altLabel broader narrower}
}
}
# Example queries for the Erfgeo connector (default type hg:Place)
query {
terms(match:"Hoorn" dataset:[ "erfgeo"] ) {
dataset
label
terms { uri prefLabel altLabel related }
}
}
query {
terms(match:"Zardam" dataset:[ "erfgeo"] ) {
dataset
label
terms { uri prefLabel altLabel related }
}
}
# And additional support for the hg:Street type
# using 'erfgeo:street' as dataset name
# add defintions in /conf/termennetwerk.xml to add other types
query {
terms(match:"Begijnhof" dataset:[ "erfgeo:street"] ) {
dataset
label
terms { uri prefLabel altLabel related }
}
}
query {
terms(match:"dam, middelburg" dataset:[ "erfgeo:street"] ) {
dataset
label
terms { uri prefLabel altLabel related }
}
}
# Basic support for the all the AdamLink concepts
query {
terms(match:"Joden Breestraat" dataset:["adamlink"] ) {
dataset
label
terms { uri prefLabel altLabel scopeNote }
}
}
or via curl:
$ curl -XPOST -H 'Content-Type:application/graphql' -d 'query { terms(match:"Abkhazian",dataset:["clavas"]) { dataset terms {uri, altLabel} } }' http://localhost:8080/nde/graphql
- load dataset recipe
- example dataset recipe
- docker setup
- keep the languages
- query multiple datasets and merge the results
- fuller support for the NDE API design
- how to deal with different response times
- use Dropwizard
- ...