Closed stefandesu closed 3 years ago
For this issue it is enough to implement getSchemes based on /vocabularies.
I think why I haven't implemented it at first is that I'm still confused by the API result for vocabularies from Skosmos instances. For example, https://bartoc-skosmos.unibas.ch/rest/v1/vocabularies?lang=en returns all vocabularies in the BARTOC Skosmos instance, one of them is EuroVoc. To get additional information about EuroVoc (even just its URI), we need to perform another API call to https://bartoc-skosmos.unibas.ch/rest/v1/EuroVoc/ which returns a ton of concept schemes. Apparently in Skosmos, there's a difference between vocabularies and concept schemes. But just the fact that we need to make another request for each and every one of those vocabularies from the first call makes it impractical to load vocabulary data from Skosmos without prior knowledge.
In any case, I will adjust getSchemes
so that vocabulary information is loaded for the given vocabularies, but those vocabularies will still need to be provided in the schemes
field of the configuration.
getSchemes
now loads additional information about given vocabularies (usually just the prefLabel). Note that we still need a list of vocabularies with URIs and VOCID
.
The SkosmosApi seems to work pretty well, but it should be refined, especially when it comes to getting vocabulary/scheme informationen and transforming the API results to JSKOS.
API documentation: http://api.finto.fi/doc/
Basically a continuation of #24.