Skip to content

Control order of graph nodes and children nodes fromRdf #395

Open
@dnllowe

Description

@dnllowe

I was previously working with a team that needed to preserve the order of parent and child nodes when created from RDF.

For example, given the quads below, we'd want to control whether subjects 1, 2, and 3 get sorted, and whether their children (properties 1, 2, and 3) are sorted. As of now, fromRdf will always sort the parent nodes and children (Subject 1, Properties 1,2,3; Subject 2, Properties 1,2,3 etc...), losing the original order:

<http://example.com/Subject3/Property3> <http://example.com/value> "3" <http://example.com/Subject3> .
<http://example.com/Subject3/Property1> <http://example.com/value> "1" <http://example.com/Subject3> .
<http://example.com/Subject3/Property2> <http://example.com/value> "2" <http://example.com/Subject3> .

<http://example.com/Subject1/Property3> <http://example.com/value> "3" <http://example.com/Subject1> .
<http://example.com/Subject1/Property1> <http://example.com/value> "1" <http://example.com/Subject1> .
<http://example.com/Subject1/Property2> <http://example.com/value> "2" <http://example.com/Subject1> .

<http://example.com/Subject2/Property3> <http://example.com/value> "3" <http://example.com/Subject2> .
<http://example.com/Subject2/Property1> <http://example.com/value> "1" <http://example.com/Subject2> .
<http://example.com/Subject2/Property2> <http://example.com/value> "2" <http://example.com/Subject2> .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions