assemblee-virtuelle / semapps

A toolbox to create semantic web applications
https://semapps.org
Apache License 2.0
86 stars 8 forks source link

LexiconImportForm: add an util to fetch Gogocarto API #1190

Open srosset81 opened 11 months ago

srosset81 commented 11 months ago

Right now with LexiconImportForm and LexiconCreateDialog we can import an util to fetch from Wikidata or ESCO. But what about adding an util to import from Gogocarto APIs ? For example, to import Transiscope items, we could have a code like this:

<LexiconImportForm
      fetchLexicon={fetchGogocarto('https://transiscope.gogocarto.fr')}
      selectData={data => ({
        'pair:label': data.label,
        'pair:comment': data.summary,
        'http://www.w3.org/ns/prov#wasDerivedFrom': data.uri,
      })}
      redirect="show"
    />

This could be used by CDLT when actors create new organizations or places.

Ping @simonLouvet

simonLouvet commented 11 months ago

@srosset81 No objection to using the GoGoCarto API to import a resource. I think it's quite relevant.