Show / Hide Table of Contents

Class PatternItem

Class for representing Node Patterns in Sparql Queries.

Inheritance
object
PatternItem
BlankNodePattern
FixedBlankNodePattern
NodeMatchPattern
QuotedTriplePattern
VariablePattern
Inherited Members
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 abstract class PatternItem

Fields

| Edit this page View Source

_context

Binding Context for Pattern Item.

Declaration
protected SparqlResultBinder _context
Field Value
Type Description
SparqlResultBinder

Properties

| Edit this page View Source

BindingContext

Sets the Binding Context for the Pattern Item.

Declaration
public SparqlResultBinder BindingContext { set; }
Property Value
Type Description
SparqlResultBinder
| Edit this page View Source

IsFixed

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

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

Repeated

Gets/Sets whether the Variable is repeated in the Pattern.

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

RigorousEvaluation

Gets/Sets whether rigorous evaluation is used, note that this setting may be overridden by the RigorousEvaluation option passed to the query processor when it is initialized.

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

Variables

Gets an enumeration of the names of the variables of this pattern.

Declaration
public virtual IEnumerable<string> Variables { get; }
Property Value
Type Description
IEnumerable<string>
Remarks

If this item is a Variable Pattern, the enumeration will contain a single item. If this item is a QuotedTriplePattern, the enumeration may contain zero or more items. For other pattern items the enumeration will be empty.

Methods

| Edit this page View Source

Accepts(IPatternEvaluationContext, INode, ISet)

Checks whether the Pattern Item accepts the given Node in the given Context.

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

Evaluation Context.

INode obj

Node to test.

ISet set
Returns
Type Description
bool
| 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 abstract void AddBindings(INode forNode, ISet toSet)
Parameters
Type Name Description
INode forNode
ISet toSet
| 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 abstract 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.

| Edit this page View Source

Construct(ConstructContext)

Constructs a Node based on this Pattern for the given Set.

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

Construct Context.

Returns
Type Description
INode
| Edit this page View Source

ToString()

Gets the String representation of the Pattern.

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

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Fields
    • _context
  • Properties
    • BindingContext
    • IsFixed
    • Repeated
    • RigorousEvaluation
    • Variables
  • Methods
    • Accepts(IPatternEvaluationContext, INode, ISet)
    • AddBindings(INode, ISet)
    • Bind(ISet)
    • Construct(ConstructContext)
    • ToString()
  • Extension Methods
Back to top Generated by DocFX