Show / Hide Table of Contents

Class ConstructContext

Context used for Constructing Triples in SPARQL Query/Update.

Inheritance
System.Object
ConstructContext
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF.Query.Construct
Assembly: dotNetRdf.dll
Syntax
public class ConstructContext

Constructors

| Improve this Doc View Source

ConstructContext(IGraph, bool)

Creates a new Construct Context.

Declaration
public ConstructContext(IGraph g, bool preserveBNodes)
Parameters
Type Name Description
IGraph g

Graph to construct Triples in.

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.

| Improve this Doc View Source

ConstructContext(INodeFactory, bool)

Creates a new Construct Context.

Declaration
public ConstructContext(INodeFactory factory, bool preserveBNodes)
Parameters
Type Name Description
INodeFactory factory

Factory to create nodes with.

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 Source

Graph

Gets the Graph that Triples should be constructed in.

Declaration
public IGraph Graph { get; }
Property Value
Type Description
IGraph
| Improve this Doc View Source

PreserveBlankNodes

Gets whether Blank Nodes bound to variables should be preserved.

Declaration
public bool PreserveBlankNodes { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Set

Gets the Set that this Context pertains to.

Declaration
public ISet Set { get; }
Property Value
Type Description
ISet

Methods

| Improve this Doc View Source

GetBlankNode(string)

Creates a new Blank Node for this Context.

Declaration
public INode GetBlankNode(string id)
Parameters
Type Name Description
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.

| Improve this Doc View Source

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.

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • ConstructContext(IGraph, bool)
    • ConstructContext(INodeFactory, bool)
  • Properties
    • Graph
    • PreserveBlankNodes
    • Set
  • Methods
    • GetBlankNode(string)
    • GetNode(INode)
  • Extension Methods
Back to top Generated by DocFX