Class ConstructContext
Context used for Constructing Triples in SPARQL Query/Update.
Inheritance
System.Object
ConstructContext
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VDS.RDF.Query.Construct
Assembly: dotNetRDF.dll
Syntax
public class ConstructContext
Constructors
| Improve this Doc View SourceConstructContext(IGraph, ISet, Boolean)
Creates a new Construct Context.
Declaration
public ConstructContext(IGraph g, ISet s, bool preserveBNodes)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to construct Triples in. |
ISet | s | Set to construct from. |
System.Boolean | preserveBNodes | Whether Blank Nodes bound to variables should be preserved as-is. |
Remarks
Either the s
or g
parameters may be null if required.
ConstructContext(INodeFactory, ISet, Boolean)
Creates a new Construct Context.
Declaration
public ConstructContext(INodeFactory factory, ISet s, bool preserveBNodes)
Parameters
Type | Name | Description |
---|---|---|
INodeFactory | factory | Factory to create nodes with. |
ISet | s | Set to construct from. |
System.Boolean | preserveBNodes | Whether Blank Nodes bound to variables should be preserved as-is. |
Remarks
Either the s
or factory
parameters may be null if required.
Properties
| Improve this Doc View SourceGraph
Gets the Graph that Triples should be constructed in.
Declaration
public IGraph Graph { get; }
Property Value
Type | Description |
---|---|
IGraph |
PreserveBlankNodes
Gets whether Blank Nodes bound to variables should be preserved.
Declaration
public bool PreserveBlankNodes { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Set
Gets the Set that this Context pertains to.
Declaration
public ISet Set { get; }
Property Value
Type | Description |
---|---|
ISet |
Methods
| Improve this Doc View SourceGetBlankNode(String)
Creates a new Blank Node for this Context.
Declaration
public INode GetBlankNode(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | ID. |
Returns
Type | Description |
---|---|
INode |
Remarks
If the same Blank Node ID is used multiple times in this Context you will always get the same Blank Node for that ID.
GetNode(INode)
Creates a Node for the Context.
Declaration
public INode GetNode(INode n)
Parameters
Type | Name | Description |
---|---|---|
INode | n | Node. |
Returns
Type | Description |
---|---|
INode |
Remarks
In effect all this does is ensure that all Nodes end up in the same Graph which may occassionally not happen otherwise when Graph wrappers are involved.