store/Graph

Source:

Methods

(async) commit(ignoreIfUnmodifiedSinceCheck) → {Promise.<GraphResource>}

Description:
  • Pushes the current graph back to repository.

Source:
Parameters:
Name Type Default Description
ignoreIfUnmodifiedSinceCheck boolean false

no if-unmodified header is sent if true, default is false.

Returns:
Type
Promise.<GraphResource>

getGraph() → {rdfjson/Graph}

Description:
  • Get the rdf Graph. The returned graph is not a copy, subsequent getGraph calls will return the same instance as long as the entry has not been refreshed or a new instance set via setGraph.

Source:
Returns:

will never be null or undefined, although the graph may be empty.

Type
rdfjson/Graph

getSource() → {Object}

Description:
  • Provides a JSON representation of the graph as rdf/json.

Source:
Returns:
Type
Object

setGraph(graph) → {Graph}

Description:
  • Set the rdf Graph. To update the graph in the repository call the commit.

Source:
Parameters:
Name Type Description
graph rdfjson/Graph

the new graph, if null or undefined a new empty graph will be set.

Returns:
  • to allow chaining with commit.
Type
Graph