o-development / ldo-legacy

Linked Data Objects
Other
19 stars 2 forks source link

How do I parse all LDOs that match a schema out of a dataset? #1

Closed ianconsolata closed 1 year ago

ianconsolata commented 1 year ago

Most of your examples show parsing a single LDO from a dataset by subject (similar to Inrupt's getThing function on a SolidDataset).

We frequently use Datasets as collections, and need to pull out all Things / LDOs from a given dataset. Is there a way to do that with LDO?

If not, I think the LDOFactory could include a parseAll method that would operate similar to getThingAll and parse all LDOs from a dataset that match the given shex schema.

jaxoncreed commented 1 year ago

At the moment, there is no Query or Match function in LDO. That's something that I plan on adding in the future.

jaxoncreed commented 1 year ago

LDO's most recent update now has a feature for this. The matchSubject and matchObject constructors will allow you select an array of items as if you were using the match method from RDF JS.