Show / Hide Table of Contents

Class ConstructContext

Context used for Constructing Triples in SPARQL Query/Update.

Inheritance
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

| Edit this page 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. May be null.

bool preserveBNodes

Whether Blank Nodes bound to variables should be preserved as-is.

| Edit this page 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. May be null.

bool preserveBNodes

Whether Blank Nodes bound to variables should be preserved as-is.

Properties

| Edit this page View Source

Graph

Gets the Graph that Triples should be constructed in.

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

PreserveBlankNodes

Gets whether Blank Nodes bound to variables should be preserved.

Declaration
public bool PreserveBlankNodes { get; }
Property Value
Type Description
bool
| Edit this page View Source

Set

Gets the Set that this Context pertains to.

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

Methods

| Edit this page 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.

| Edit this page 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 occasionally not happen otherwise when Graph wrappers are involved.

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • 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