Class PatternItem
Class for representing Node Patterns in Sparql Queries.
Inheritance
Inherited Members
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 SourceBindingContext
Sets the Binding Context for the Pattern Item.
Declaration
public SparqlResultBinder BindingContext { set; }
Property Value
| Type | Description |
|---|---|
| SparqlResultBinder |
IsFixed
Return true if this pattern item contains no variables, false otherwise.
Declaration
public abstract bool IsFixed { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Repeated
Gets/Sets whether the Variable is repeated in the Pattern.
Declaration
public virtual bool Repeated { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
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 |
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 SourceAccepts(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 |
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 |
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. |
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 |
ToString()
Gets the String representation of the Pattern.
Declaration
public override abstract string ToString()
Returns
| Type | Description |
|---|---|
| string |