inrupt / inrupt/solid-client-js

Reading a Thing from a blank node in a SolidDataset

Open
#948 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Triaged
Dominant language
TypeScript
Stars
245
Forks
42
Avg merge
12h 49m
Merged PRs (30d)
22

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the getThing and getUrl documentation and the SolidDataset, Thing, and ThingLocal concepts described in the issue. Determine how a blank-node object can be read without treating it as a URL; done means the Turtle example can produce a readable ThingLocal-like value instead of getUrl returning null and throwing.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.