Show / Hide Table of Contents

Class VariablePattern

Pattern which matches Variables.

Inheritance
object
PatternItem
VariablePattern
Inherited Members
PatternItem._context
PatternItem.BindingContext
PatternItem.RigorousEvaluation
PatternItem.Repeated
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VDS.RDF.Query.Patterns
Assembly: dotNetRdf.dll
Syntax
public class VariablePattern : PatternItem

Constructors

| Edit this page View Source

VariablePattern(string)

Creates a new Variable Pattern.

Declaration
public VariablePattern(string name)
Parameters
Type Name Description
string name

Variable name.

| Edit this page View Source

VariablePattern(string, bool)

Creates a new Variable Pattern.

Declaration
public VariablePattern(string name, bool rigorousEvaluation)
Parameters
Type Name Description
string name

Variable name.

bool rigorousEvaluation

Whether to force rigorous evaluation.

Properties

| Edit this page View Source

IsFixed

Return true if this pattern item contains no variables, false otherwise.

Declaration
public override bool IsFixed { get; }
Property Value
Type Description
bool
Overrides
PatternItem.IsFixed
| Edit this page View Source

VariableName

Gets the name of the variable that this pattern matches.

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

Variables

Gets the Name of the Variable this Pattern matches.

Declaration
public override IEnumerable<string> Variables { get; }
Property Value
Type Description
IEnumerable<string>
Overrides
PatternItem.Variables

Methods

| Edit this page View Source

Accepts(IPatternEvaluationContext, INode, ISet)

Checks whether the given Node is a valid value for the Variable in the current Binding Context.

Declaration
public override bool Accepts(IPatternEvaluationContext context, INode obj, ISet s)
Parameters
Type Name Description
IPatternEvaluationContext context

Evaluation Context.

INode obj

Node to test.

ISet s
Returns
Type Description
bool
Overrides
PatternItem.Accepts(IPatternEvaluationContext, INode, ISet)
| Edit this page View Source

AddBindings(INode, ISet)

Returns the variable bindings created when this pattern item accepts the given node to the specified set.

Declaration
public override void AddBindings(INode forNode, ISet toSet)
Parameters
Type Name Description
INode forNode
ISet toSet
Overrides
PatternItem.AddBindings(INode, ISet)
| Edit this page View Source

Bind(ISet)

Returns a node created by applying the variable bindings in the input set to this pattern item.

Declaration
public override INode Bind(ISet variableBindings)
Parameters
Type Name Description
ISet variableBindings
Returns
Type Description
INode

A node binding for the pattern item or null if no binding is possible with the provide set.

Overrides
PatternItem.Bind(ISet)
| Edit this page View Source

Construct(ConstructContext)

Constructs a Node based on the given Set.

Declaration
public override INode Construct(ConstructContext context)
Parameters
Type Name Description
ConstructContext context

Construct Context.

Returns
Type Description
INode

The Node which is bound to this Variable in this Solution.

Overrides
PatternItem.Construct(ConstructContext)
| Edit this page View Source

ToString()

Gets the String representation of this pattern.

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
PatternItem.ToString()

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • VariablePattern(string)
    • VariablePattern(string, bool)
  • Properties
    • IsFixed
    • VariableName
    • Variables
  • Methods
    • Accepts(IPatternEvaluationContext, INode, ISet)
    • AddBindings(INode, ISet)
    • Bind(ISet)
    • Construct(ConstructContext)
    • ToString()
  • Extension Methods
Back to top Generated by DocFX