SemWeb : SemWeb.Query Namespace
VariableBinding Struct

A binding between a query variable and a resource in the target data model.

public struct VariableBinding


Remarks

None.

Members

See Also: Inherited members from ValueType.

Constructors

Constructs a new VariableBinding struct.

Properties

Name [read-only]
string . The name of the variable as used in the query, or null if it had no name.
Target
SemWeb.Resource . The resource in the target data model that the variable is bound to, or null.
Variable
SemWeb.Variable . The variable.

Methods

static Substitute (VariableBinding[], SemWeb.Statement) : SemWeb.Statement
Replaces the variables in the statement with their bound values.

Member Details

Variable Property

public SemWeb.Variable Variable { set; get; }

The variable.

Value

An anonymous entity.

Remarks

None.

Target Property

public SemWeb.Resource Target { set; get; }

The resource in the target data model that the variable is bound to, or null.

Value

The resource in the target data model that the variable is bound to, or null if the variable is not bound in this result.

Remarks

A variable may be unbound only if it was used exclusively in optional statements.

Substitute Method

public static SemWeb.Statement Substitute (VariableBinding[] variables, SemWeb.Statement template)

Replaces the variables in the statement with their bound values.

Parameters

variables
An array of variable bindings.
template
The statement containing variables to replace.

Returns

The statement with variables replaced by target values.

Remarks

Variables may be unbound, in which case their values are null. The returned statement may therefore have a null subject, predicate, object, or meta.

Name Property

public string Name { get; }

The name of the variable as used in the query, or null if it had no name.

Value

The name of the variable as used in the query, or null if it had no name.

Remarks

None.

VariableBinding Constructor

public VariableBinding (SemWeb.Variable variable, SemWeb.Resource target)

Constructs a new VariableBinding struct.

Parameters

variable
The variable in the query represented by this binding.
target
The bound value of the variable, or null if the variable is unbound in this result.

Remarks

None.