SkohubProvider

SkoHub Vocabs

SkoHub Vocabs is a static site generator that provides HTML/JSON versions of vocabularies as static files.

Example vocabulary (configured below): https://w3id.org/class/esc/scheme

It is important that a dereferenceable scheme URI is used. When configured via BARTOC in the API field, "http://bartoc.org/api-type/skohub" needs to be given as the type and the aforementioned dereferenceable scheme URI needs to be given as the URL.

See also: https://github.com/gbv/cocoda-sdk/issues/29

{
 "uri": "http://coli-conc.gbv.de/registry/skohub.io",
 "provider": "Skohub",
 "schemes": [
   {
     "uri": "https://w3id.org/class/esc/scheme",
   }
 ]
}

Constructor

new SkohubProvider()

Methods

Returns concept search results.

Parameters:
NameTypeDescription
configObject
Properties
NameTypeAttributesDefaultDescription
searchstring

search string

schemeObject<optional>

concept scheme to search in

limitnumber<optional>
100

maximum number of search results

Returns:

array of JSKOS concept objects

Type: 
Array

(async) suggest(config) → {Array}

Returns suggestion result in OpenSearch Suggest Format.

Parameters:
NameTypeDescription
configObject
Properties
NameTypeAttributesDefaultDescription
searchstring

search string

schemeObject<optional>

concept scheme to search in

limitnumber<optional>
100

maximum number of search results

Returns:

result in OpenSearch Suggest Format

Type: 
Array

(static) _registryConfigForBartocApiConfig(options) → {Object}

Used by registryForScheme (see src/lib/CocodaSDK.js) to determine a provider config for a concept schceme.

Parameters:
NameTypeDescription
optionsObject
Properties
NameTypeDescription
urlObject

API URL for BARTOC instance

schemeObject

scheme for which the config is requested

Returns:

provider configuration

Type: 
Object