OSLC / ldp-app

A simple client application to do CRUD operations on an LDP server and create a graphic display of an LDPC
Apache License 2.0
4 stars 1 forks source link

vis.js needs to be reimplemented to use rdflib.js #5

Open jamsden opened 5 years ago

jamsden commented 5 years ago

vis.js needs to use db.query() to get the triples, and then convert IndexedFormula statements into the graph.

Without doing this, the web page won't successfully load, but you can still test the server with curl or Postman:

curl --request GET \
 --url http://localhost:3000/univ/umaine/students \
 --header 'Accept: text/turtle'
jamsden commented 5 years ago

The old LDPjs implementation of vis.js accessed the raw triples in the database. This is why the underlying database was exposed to the app. However, this is not a desirable solution as it depends directly on the storage service implementation and doesn't use any OSLC client or query abstraction.

The storage service query method implementation is incomplete, so that's not an option. A simple implementation that is similar to what was in LDPjs, and therefore preserves more of the vis.js implementation, would be to use rdflib to read all the triples and then just update the vis.js implementation to get the data from rdflib statements.

But storage services doesn't expose rdflib or any method that returns all triples - which would be a strange method.