Constructor
new RDFEnvironment()
Extends
Members
baseIRI
Return the base IRI from this environment's context.
- Inherited From:
Methods
abstract computeGraphObject()
Given a Graph, extract the first subject term, extract its description and instantiate it.
abstract computeGraphObjects(graph, identifiers)
Given a Graph and a list of identifiers, extract their descriptions and instantiate them.
Parameters:
Name | Type | Description |
---|---|---|
graph |
Graph | |
identifiers |
Array | The sought identifiers |
abstract computeObjectGraph(object)
Parameters:
Name | Type | Description |
---|---|---|
object |
Object |
createAnonymousNode()
createBlankNode()
createGraph()
createLiteral()
createNamedNode()
createObject(className, identifier, stateopt)
Given a class name, the instance identifier and an initial state, instantiate the object, assign the initial state, create its proxy and return that.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
className |
string | ||
identifier |
string | ||
state |
Object |
<optional> |
- Inherited From:
createPatch()
createQuad(subject, predicate, object, graphopt)
Create a Quad with provisions from translation from curie terms and completion of relative iri. Use the environment's location as the default graph name
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
subject |
Node | ||
predicate |
NamedNode | ||
object |
Term | ||
graph |
Node |
<optional> |
createStatement(subject, predicate, object, graphopt)
Create a statement with provisions from translation from curie terms and completion of relative iri.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
subject |
Node | |||
predicate |
NamedNode | |||
object |
Term | |||
graph |
Node |
<optional> |
null |
createTriple(subject, predicate, object)
Create a Triple with provisions from translation from curie terms and completion of relative iri.
Parameters:
Name | Type | Description |
---|---|---|
subject |
Node | |
predicate |
NamedNode | |
object |
Term |
decode()
The function decode accepts a document, a content type and an optional continuation, It parses the document and returns or continues with the result, by retrieving the respective decoder and delegating the operation to that function.
fieldDefinition(identifier) → {PropertyDefinition}
Given a property identifier, return the definition from the environment's context.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
string | URL | An identifier present in the context |
- Inherited From:
- To Do:
-
- The definition should be a standard JavaScript property descriptor
- Change name to getPropertyDescriptor
fieldType()
Given a property identifier, return the type from its definition
- Inherited From:
- To Do:
-
- Change name to getPropertyType
findIdentifierName()
Given an IRI, return the property name associated with it in the environment. If none is present in the context, add a definition which specifies the IRI leaf as the name. The first probe searches the context for a property definition which specifies the iri as its @id. That result is then cached for future references.
- Inherited From:
findNameIdentifier(name)
Given a property name, return the IRI associated with it in the environment.
Parameters:
Name | Type | Description |
---|---|---|
name |
string |
- Inherited From:
graphResourceID(graph)
Return the identifier for the root node of the given Graph.
Parameters:
Name | Type | Description |
---|---|---|
graph |
Graph |
graphResourceIDs(graph)
Return the identifers for all nodes in the given Graph.
Parameters:
Name | Type | Description |
---|---|---|
graph |
Graph |
resolveContext(context)
Accept a context designator, retrieve if necessary, expand all definitions, and bind the environment's context property to it.
Parameters:
Name | Type | Description |
---|---|---|
context |
string | URL | Context | The context to resolve. |
- Inherited From:
toLiteral()
The function toLiteral accepts an native object and coerces it to a Literal instance. It distinguishes between Object specializations and primitive data. In those cases, use the type to compute a converter and delegate to that. Return unmodified any data which is already a Term.
from rdflib.js https://github.com/linkeddata/rdflib.js/blob/master/src/literal.js
toValue()
The function toValue accepts a Term and converts it to a native value