Closed nichtich closed 5 years ago
We could start with STW (via http://zbw.eu/beta/skosmos) to support our colleagues at ZBW.
Access to individual vocabularies vis Skosmos should be configured in Cocoda, e.g.
{
"provider": "SkosmosApi",
"api": "http://zbw.eu/beta/skosmos/rest/v1/",
"schemes": [ {
"uri": "http://bartoc.org/en/node/313",
"VOCID": "stw"
} ]
}
So Cocoda could build queries such as {api}{VOCID}?lang={lang}
to get information about a vocabulary and {api}{VOCID}/data?uri={uri}&format=application/json
to get all information about a concep. Examples:
There are other concept related queries but /data
is enough to start with.
Top concepts and concept types do not need to be supported from the beginning but we need search via Skosmos. The search URL pattern is '{api}{VOCID}/search?query={query}*&unique=1
. Example:
Too bad you can only request concept scheme labels in one language at the same time. For concepts on the other hand, all labels are returned in one /data
request.
Too bad you can only request concept scheme labels in one language at the same time.
For popular vocabularies we may don't need the information anyway as it should be included in kos-registry via Wikidata, BARTOC or kos.yaml
. kos-registry.json
could be linked as static file to Cocoda config
For popular vocabularies we may don't need the information anyway as it should be included in kos-registry via Wikidata, BARTOC or
kos.yaml
.kos-registry.json
could be linked as static file to Cocoda config
Good point.
I added a first implementation of the Skosmos wrapper with STW as an example. Note that their API seems to have some issues currently, but in general it should work (no top concepts, but loading concepts and suggest work).
Some caveats/further tasks:
/data
endpoint. The problem is that in this case, the registry's /data
endpoint depends on the vocabulary. I will find some solution for this eventually. /data
endpoint also exists as a global endpoint on Skosmos instances, so we can use that for API URLs. 👍/data
endpoint doesn't return anything for concepts.../data
(they are included in the response) which works very well. But Cocoda has some assumptions about the relation between narrower
and ancestors
that sets a concept's ancestors
property which causes Cocoda not to show its broader concepts anymore. This has to be fixed as well.Right now, it doesn't seem to work in dev at all, although it still works fine locally. I'll investigate.
Such an obvious error. It works now, so feel free to test.
Create new specific issues for missing functionality if necessary.
Or add JSKOS support to Skosmos. This is important to support a much larger number of terminologies, see https://bartoc-skosmos.unibas.ch/en/ and http://zbw.eu/beta/skosmos/stw/ among others. See also https://bartoc-fast.ub.unibas.ch/bartocfast/about for a list of public Skosmos instances (and a federated search on them). API documentation is available at http://api.finto.fi/doc/