-
Notifications
You must be signed in to change notification settings - Fork 4
Description
From https://hub.datalad.org/datalink/tools/issues/9
shacl-vue
works with graph data using the rdf-ext
library, by saving some quads to an rdf.dataset()
(import rdf from 'rdf-ext'
), after loading them from a ttl file with pre-existing rdf data. shacl-vue
also works with shacl shapes (loaded from a ttl file) from which it can autogenerate forms. The forms make use of all the property shapes for any given node shape in order to know which form fields there should be and what type of data they should allow a user to enter, including how these fields should be validated. There is an internal representation of the data entered into a form: it is basically an object with any particular node shape uri (i.e. a triple subject) as a key and a javascript object as the value, which in turn has the triple predicates as keys and the triple objects as values. If a form is saved, a function takes this internal representation and converts it to quads that are added to the same rdf.dataset
.
The user should more or less experience the following:
- open the application in the browser
- see and browse through an overview of the existing linked data
- navigate to a specific node (a.k.a. data object) and see its properties
- have an option to select a node for further annotation / editing, and saving the edits
- have an option to add a new node, by entering all necessary data in a form (generated from the relevant shacl shapes)
I am currently thinking about how to design the different aspects of the data store. There is:
- the
rdf.dataset()
, which is more or less an in-browser-in-memory quad store, for the existing data and for any data saved from a form, and - the internal javascript object-based representation for data being entered into a form
I am not sure if the internal representation is a good way to do it, and whether there are existing alternatives for such a use case. I am also not sure how to approach the step of editing an existing node. Since a node will also be edited in a form generated from relevant shacl shapes, I could take the relevant quads from the dataset, convert them into the internal representation for a given form for editing, then edit, and then save it back to the dataset as quads when the editing process is completed. But this could be an inefficient way of doing it, perhaps there are known and widely used alternatives? Also, when saving the "edited" quads back to the dataset, these will be new nodes and the equivalent existing nodes will remain unchanged, which means older versions of the data that remain in the dataset might cause conflicts or confusion.