From a95a274527897123aedfb3dc5b34bc0935c2e269 Mon Sep 17 00:00:00 2001 From: Stefan Peters Date: Tue, 11 Oct 2022 14:39:03 +0200 Subject: [PATCH] Adjust README and documentation for MyCoRe provider (#50) --- README.md | 2 ++ src/providers/mycore-provider.js | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7b40537..c7a35fd 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,8 @@ The following providers are also exported, but have to be added via `cdk.addProv - **This integration is currently experimental and only supports LCSH and LCNAF.** - `Skohub` - access to concept schemes and concepts via a [SkoHub Vocabs](https://blog.lobid.org/2019/09/27/presenting-skohub-vocabs.html) - **This integration is currently experimental. Only vocabularies that use a [slash namespace pattern]([hash](https://www.w3.org/2001/sw/BestPractices/VM/http-examples/2006-01-18/#slash)) with dereferenceable URIs are supported.** +- `MyCoRe` - access to vocabularies via [MyCoRe](https://www.mycore.de/) + - **This integration is currently experimental. Only one vocabulary per registry is supported. Not recommended for large vocabularies as all of the vocabulary data is loaded and kept in memory.** - `ReconciliationApi` - access to mapping suggestions via a [OpenRefine Reconciliation API](https://github.com/OpenRefine/OpenRefine/wiki/Reconciliation-Service-API) - `OccurrencesApi` - access to concept occurrences via [occurrences-api](https://github.com/gbv/occurrences-api) (will be changed to [occurrences-server](https://github.com/gbv/occurrences-server) in the future) - `LabelSearchSuggestion` - access to mapping suggestions using other registries' search endpoints (using [jskos-server]) diff --git a/src/providers/mycore-provider.js b/src/providers/mycore-provider.js index a61aa2a..00c7d47 100644 --- a/src/providers/mycore-provider.js +++ b/src/providers/mycore-provider.js @@ -9,11 +9,21 @@ import FlexSearch from "flexsearch" const data = {} /** - * MyCoRE Classification API - * - * Currently supports only one vocabulary per registry. + * MyCoRe Classification API * * See also: https://github.com/gbv/cocoda-sdk/issues/50 + * + * To use it in a registry, specify `provider` as "MyCoRe" and provide the API URL as `api`: + * ```json + * { + * "uri": "http://coli-conc.gbv.de/registry/mycore-shbsg", + * "provider": "MyCoRe", + * "api": "https://bibliographie.schleswig-holstein.de/api/v2/classifications/shbib_sachgruppen.json" + * } + * ``` + * + * Specifying `schemes` is currently not required and it will not be used. Currently supports only one vocabulary per registry. + * */ export default class MyCoReProvider extends BaseProvider {