solid-client-js
solid-client-js copied to clipboard
Reading a Thing from a blank node in a SolidDataset
Search terms you've used
I've searched the issues on this repo and the solid community forum for posts referring to "blank node"
The getThing documentation has a variation for getting a Thing from a URL, and one for a LocalNode
which may be the right track
Feature suggestion
I have a SolidDataset
containing a blank node as the object of a triple and I want to be able to read it, ultimately into a ThingLocal
object
Expected functionality/enhancement
If it wasn't a blank node, I could do this:
const newThing: Thing = getThing(dataset, getUrl(thing, property));
My dream would be something more intuitive and similar to Jena:
const newThing: Thing = thing.getPropertyResourceValue(property);
Actual functionality/enhancement
I find that getUrl
returns null
because it's not a valid URL which throws an error
Use Cases
I make a request to the server which returns content in Turtle format. I'm able to parse that data into a SolidDataset
containing the following Quad entry:
object: BlankNode {id: "_:n3-3"}
predicate: NamedNode {id: "..."}
subject: NamedNode {id: "..."}
Additional information
I'm in control of this server endpoint so I don't have to return the resource with a blank node - I'll workaround this issue by returning the object as a named node