CLARIAH / vocab-workers

0 stars 0 forks source link

Detect which catalogs know a vocabulary #3

Open lilimelgar opened 2 months ago

lilimelgar commented 2 months ago

The vocabularies from the vocabulary registry may also be indexed by other vocabulary registries. It would be useful if we could present a link to those registries per vocabulary. For that, we need to:

  1. Identify which vocabulary registries we would like to map to
  2. For each vocabulary, detect if they have an API
  3. Write a worker script that fetches the data from the API, gets the vocabulary Id and compares it to our Id
  4. If the Id is the same, fetch the URI to the target vocabulary
  5. Store the URI in???
kerim1 commented 1 week ago

For BARTOC:

  1. Use the Suggest API: https://bartoc.org/api/voc/suggest?search=<> Use the cmdi:identifier or the cmdi:title to find suggestions.
  2. Go through the list of BARTOC URI's and for each URI:
  3. Use the Voc API: https://bartoc.org/api/voc?uri=<uri>
  4. And see if the namespace url matches
  5. Print to screen for now what has to be recorded in the record
    <cmd:Assessement>
                <cmd:Recommendation>
                    <cmd:Rating>appears</cmd:Rating>
                    <cmd:Publisher>
                        <cmd:uri>https://triplydb.com/none/gold</cmd:uri>
                        <cmd:publisherUri>https://triplydb.com</cmd:publisherUri>
                        <cmd:name>YALC</cmd:name>
                    </cmd:Publisher>
                </cmd:Recommendation>
                <cmd:Recommendation>
                    <cmd:Rating>appears</cmd:Rating>
                    <cmd:Publisher>
                        <cmd:uri>http://bartoc.org/en/node/17985</cmd:uri>
                        <cmd:publisherUri>http://bartoc.org</cmd:publisherUri>
                        <cmd:name>BARTOC</cmd:name>
                    </cmd:Publisher>
                </cmd:Recommendation>
            </cmd:Assessement>