Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

There are no means to update Sponate mapping #2

Open
patrickwestphal opened this issue Nov 22, 2013 · 1 comment
Open

There are no means to update Sponate mapping #2

patrickwestphal opened this issue Nov 22, 2013 · 1 comment
Assignees

Comments

@patrickwestphal
Copy link
Member

When having set a Sponate mapping, e.g. via

store.addMap({
    name: 'castles',
    template: [{
      id: '?s',
      name: '?l',
      depiction: '?d',
    }],
   from: '{ Select * { ?s a dbpedia-owl:Castle ; rdfs:label ?l ; foaf:depiction ?d ; dbpedia-owl:owner ?o . ?o rdfs:label ?on . Filter(langMatches(lang(?l), "en")) . Filter(langMatches(lang(?on), "en")) } Limit 10 }'
});

there is no way to update it. Calling the addMap method again will result in an error:

[ERROR] An attribute / store with name concept0 already exists

In some cases it would be very usefull to update or re-set a mapping for a given name, e.g. via delMap or by just calling addMap again.

@ghost ghost assigned Aklakan Nov 22, 2013
@Aklakan
Copy link
Member

Aklakan commented Nov 22, 2013

Here is my API suggestion:

  • store.addMap should allow adding multiple mappings which become overlays based on the name attribute - so a query will run on the union of all the maps (not there yet)
  • the JSON for the mapping gets extended with an optional id attribute that enables referring to a specific map
  • store.delete("mapName") deletes all maps by name, such that store.mapName becomes undefined.
  • store.mapName.clear() clears all maps so that store.mapName is still defined, yet queries can only yield empty results.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants