Class

Graph

Graph(statements, optionsopt)

The class Graph encapsulates a statement sequence with a location url, to augment Triple content, and a base IRI to extend relative IRI to absolute.

Constructor

new Graph(statements, optionsopt)

Parameters:
Name Type Attributes Description
statements array
options Object <optional>

View Source rdf-environment.js, line 526

Members

string

baseIRI

the base url for operation which complete a relative iri argument

View Source rdf-environment.js, line 541

string

location

the location URL

View Source rdf-environment.js, line 536

array

statements

View Source rdf-environment.js, line 543

Methods

computeDeltas()

Compute a set of identified deltas from the graph content. Each entry is an array of which the first element is the lexical identifier of a subject and the second is an array of roll-forward deltas. That is, the first value is set to a JavaScript value and the second is left undefined.

View Source rdf-environment.js, line 563

encode(mediaType, continuationopt)

Given a media type, encode the graph as a document string which represents each statement with its lexical form. return that value or delegate to the continuation.

Parameters:
Name Type Attributes Description
mediaType string
continuation function <optional>

If present, invoke with the encoded value and return that result.

View Source rdf-environment.js, line 553

forEach()

Delegate a forEach operation to the graph's statements.

View Source rdf-environment.js, line 619