Skip to content

sdevalk/nde-termennetwerk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NDE - Termennetwerk (pilot)

Pilot implementation for the NDE Termennetwerk created for the CLARIAH Techdag November 30, 2018.

Got a question about this pilot? Please contact us!

Build & Start

$ 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

Endpoints

  1. GraphQL endpoint: http://localhost:8080/nde/graphql
  2. GraphiQL endpoint: http://localhost:8080/static/graphiql/index.html

Queries

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 }
  }
}

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

TODO

  • 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
  • ...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 94.6%
  • CSS 2.6%
  • Java 2.2%
  • Other 0.6%