-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support initialization of registries via BARTOC API types #34
Comments
My suggestions on how to implement this:
What do you think? |
@nichtich I've started to implement this and encountered an issue that will probably affect many of BARTOC's vocabularies that have to I saw that in BARTOC, you used a workaround by requesting top concepts for each possible scheme URI and then remembering which one returned a result. Unfortunately, this is neither feasible (requires multiple requests) nor useful (what if a scheme doesn't have top concepts?). Do you have an idea on how to get around this? One idea I've yet to try is to use the |
APIs usually require a specific scheme URI to be used. In order to determine this URI, the schemes itself are requested from the API and its URIs are kept in a cache.
I submitted the first implementation in branch issue-34. The current workaround I used for the above issue is the following: Each provider for schemes (i.e. ConceptApi and SkosmosApi) now keeps track of main scheme URIs for all supported schemes. If for a certain scheme it is unknown whether it's supported, we request information about that scheme from the API. If information is available, it is saved in a "approvedSchemes" cache (so later we only need to retrieve the main scheme URI from that cache). If no information is available, it is assumed that the scheme is unsupported by the API and it is saved in a "rejectedSchemes" cache. There is also an example usage under |
I've tried the example but it failed with EuroVoc because BARTOC did not include the URI http://eurovoc.europa.eu/domains used to identify BARTOC at the corresponding Skosmos instance.
I think the result is saved in Looks ok except the handling of different providers in |
I will look into the EuroVoc issue.
I think it would make even more sense to move the |
You added the appropriate URI to the BARTOC entry and now it works, right? Because I couldn't reproduce the error. With the other change from my previous comment, I now (not yet pushed) changed the However, we do need a way to detect errors when using API types. Any suggestion how to do this? |
The current way (throwing an error) seems fine. |
Ah, I only now understood that the error occurred during |
Merged into dev, will be included in the next release. |
BARTOC collects information about vocabulary APIs with two fields for each:
cocoda-sdk should support initialization of a registry with this data. See https://github.com/gbv/bartoc.org/blob/main/vue/utils.js for current implementation in BARTOC. Maybe cdk should internally support a registry cache as well?
The text was updated successfully, but these errors were encountered: