Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

netwerk-digitaal-erfgoed/nde-termennetwerk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ This repository is archived

A new Network of Terms application is available in network-of-terms-api.

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:

# Clavas
query {
  terms(match:"*Dutch*" dataset:["clavas"]) {
    dataset
    terms {
      uri
      prefLabel
    }
  }
}

# Gemeenschappelijke Thesaurus Audiovisuele Archieven (GTAA) and Wikidata
query {
  terms(match:"*fietsen*" dataset:["gtaa","wikidata"]) {
    dataset
    terms {
      uri
      prefLabel
      altLabel
    }
  }
}

# Nederlandse Thesaurus van Auteursnamen (NTA)
query {
  terms(match:"wolkers" dataset:["nta"] ) {
    dataset
    label
    terms {
      uri
      prefLabel
      altLabel
      definition
      scopeNote
    }
  }
}

# Cultuurhistorische Thesaurus (CHT) and Volkenkundige Thesaurus (SVCN)
query {
  terms(match:"amerika" dataset:["cht","svcn"]) {
    dataset
    terms {
      uri
      prefLabel
      altLabel
      scopeNote
    }
  }
}

# WO2 Thesaurus
query {
  terms(match:"bezetting" dataset:["wo2"] ) {
    dataset
    label
    terms {
      uri
      prefLabel
      altLabel
      definition
      scopeNote
    }
  }
}

# AAT
query {
  terms(match:"wiel*" dataset:["aat"] ) {
    dataset
    label
    terms {
      uri
      prefLabel
      altLabel
      definition
      scopeNote
    }
  }
}

# Stichting Omroep Muziek Termen
query {
  terms(match:"cello" dataset:["som"] ) {
    dataset
    label
    terms {
      uri
      prefLabel
      scopeNote
    }
  }
}

# Virtuele Thesaurus voor Mode en Kostuums
query {
  terms(match:"overjas" dataset:["vtmk"] ) {
    dataset
    label
    terms {
      uri
      prefLabel
      scopeNote
      altLabel
      broader
      narrower
    }
  }
}

# Erfgeo (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" 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
    }
  }
}

# RKDartists
query {
  terms(match:"rembrandt" dataset:["rkdartists"] ) {
    dataset
    label
    terms {
      uri
      prefLabel
      scopeNote
      altLabel
    }
  }
}

# Archeologisch Basisregister (ABR)
query {
  terms(match:"bezemstreek" dataset:["abr"] ) {
    dataset
    label
    terms {
      uri
      prefLabel
      scopeNote
      altLabel
      broader
      narrower
    }
  }
}

# Muziek: genres en stijlen (Muziekweb)
query {
  terms(match:"Viool" dataset:["mwgenresstijlen"] ) {
    dataset
    label
    terms {
      uri
      prefLabel
      scopeNote
      broader
      narrower
    }
  }
}

# Muziek: personen en groepen (Muziekweb)
query {
  terms(match:"Boeijen" dataset:["mwpersonengroepen"] ) {
    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

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.1%
  • Java 2.8%
  • CSS 2.5%
  • Other 0.6%