0.24.1 • Published 2 months ago

@equinor/rdf-graph v0.24.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

@equinor/rdf-graph - Core Library

core version

Core package with only one dependency (N3.js). Core's responsibility is to transfer addition and / or removal of RDF triples into something called GraphPatches. GraphPatches are addition or removal of nodes, edges, node properties or edge properties. The purpose of this is to make it easy to visualize rdf in graph visualization tool, but in theory it can be used in any application that wants to convert RDF into a property graph and even modify the RDF and see those changes reflected in the property graph.

Example

import { RdfGraph, GraphPatch, GraphState, RdfPatch, turtleToQuads } from '@equinor/rdf-graph';

// Create a RdfGraph state object
const state: GraphState = new RdfGraph({ symbolProvider });

// In this example we want to "add" all RDF triples from some turtle
// data to our custom UI
const turtleString = "....";

// Create a set of RdfPatch'es from our RDF data
// An RdfPatch is simply an object containing an action and a N3 Quad:
//
//    RdfPatch
//
//    { 
//      action: "add" | "remove";
//      data: N3.Quad;
//    }
//
const rdfPatches: RdfPatch[] = turtleToQuads(turtleString)
                    .map(q => ({ action: "add", data: q}));

// Get UI graph patches by patching the rdf-graph state with the RdfPatches
const graphPatches: GraphPatch[] = state.patch(rdfPatches);

// Apply the graph patches to your UI state handler
myAwesomeUiImplementation.applyGraphPatches(graphPatches);

Symbol Provider

TODO

0.24.1

2 months ago

0.24.0

3 months ago

0.22.0

5 months ago

0.21.0

1 year ago

0.20.0

1 year ago

0.21.1

1 year ago

0.19.0

1 year ago

0.17.2

1 year ago

0.16.0

1 year ago

0.15.1

1 year ago

0.17.0

1 year ago

0.18.0

1 year ago

0.17.1

1 year ago

0.9.3

2 years ago

0.10.0

2 years ago

0.11.0

2 years ago

0.10.1

2 years ago

0.12.0

2 years ago

0.11.1

2 years ago

0.13.0

2 years ago

0.9.2

2 years ago

0.14.0

1 year ago

0.15.0

1 year ago

0.14.1

1 year ago

0.9.1

2 years ago

0.9.0

2 years ago

0.8.1

2 years ago

0.8.0

2 years ago

0.7.7

2 years ago

0.7.6

2 years ago

0.7.5

2 years ago

0.7.4

2 years ago

0.7.3

2 years ago

0.7.2

2 years ago