You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There might be an architectural decision to make here. I'll describe my use case and current blockers.
I use pos-resource to make a resource available to descendants. This includes creating pos-resource elements and setting their uri programmatically (usually with lazy=true)
When the resource is a blank node, pos-resource errors with e.g. NamedNode IRI "_g_L9C317" must be absolute
You are right, PodOS mostly assumes named nodes currently and I did not spent much thoughts on blank nodes(yet). I am trying to avoid them as described in your workaround.
Some things come to my mind, but the whole blank node situation must be carefully thought through:
a blank node is also a resource just without a name (URI), so pos-resource could apply
using uri attribute to refer to a blank node is definitely not right, we either need to rename it or add another attribute to handle blank node
how would one refer to blank nodes?
pos-resource does 2 things: fetch and set the context for siblings. Fetching does not apply to blank nodes
we also need to consider collections, it is another but maybe similar topic
My current use case actually relates to collections - my list component creates pos-resource elements and sets their uri. Calling lazy=true suppresses fetching but allows descendants to receive the resource.
If it's a blank node, the uri starts with an underscore, e.g. _g_L9C317
There might be an architectural decision to make here. I'll describe my use case and current blockers.
I use pos-resource to make a resource available to descendants. This includes creating pos-resource elements and setting their uri programmatically (usually with lazy=true)
When the resource is a blank node, pos-resource errors with e.g. NamedNode IRI "_g_L9C317" must be absolute
I would need to confirm, but it appears the error is thrown by os.store.get when checking editable, which in turn assumes that the Uri is a named node: https://github.com/linkeddata/rdflib.js/blob/cd9a5960ef01bf9350c55a349db4410bc029a796/src/update-manager.ts#L154
There are other places that the PodOs code currently assumes a Uri is a named node/sym, e.g.
PodOS/core/src/thing/Thing.ts
Line 99 in e490428
Current workaround is to rewrite data to avoid using blank nodes.
Issues to address:
The text was updated successfully, but these errors were encountered: