Show / Hide Table of Contents

Class BaseTriplePattern

Base class for representing all types of Triple Patterns in SPARQL queries.

Inheritance
object
BaseTriplePattern
BindPattern
FilterPattern
LetPattern
PropertyFunctionPattern
PropertyPathPattern
SubQueryPattern
TriplePattern
Implements
ITriplePattern
IComparable<ITriplePattern>
IProcessable
IVisitable
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 BaseTriplePattern : ITriplePattern, IComparable<ITriplePattern>, IProcessable, IVisitable

Fields

| Edit this page View Source

_vars

Stores the list of variables that are used in the Pattern.

Declaration
protected List<string> _vars
Field Value
Type Description
List<string>

Properties

| Edit this page View Source

FixedVariables

Gets the enumeration of fixed variables in the pattern i.e. variables that are guaranteed to have a bound value.

Declaration
public abstract IEnumerable<string> FixedVariables { get; }
Property Value
Type Description
IEnumerable<string>
| Edit this page View Source

FloatingVariables

Gets the enumeration of floating variables in the pattern i.e. variables that are not guaranteed to have a bound value.

Declaration
public abstract IEnumerable<string> FloatingVariables { get; }
Property Value
Type Description
IEnumerable<string>
| Edit this page View Source

HasNoBlankVariables

Gets whether the Pattern has no blank variables.

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

IsAcceptAll

Returns whether the Triple Pattern is an accept all.

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

PatternType

Gets the Triple Pattern Type.

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

UsesDefaultDataset

Gets whether a Triple Pattern is Thread Safe when evaluated.

Declaration
public virtual bool UsesDefaultDataset { get; }
Property Value
Type Description
bool
Remarks

Almost all Triple Patterns are Thread Safe unless they are sub-query patterns which themselves are not thread safe.

| Edit this page View Source

Variables

Gets the List of Variables used in the Pattern.

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

These are sorted in alphabetical order.

Methods

| Edit this page View Source

Accept<T>(ISparqlAlgebraVisitor<T>)

Accept a simple algebra visitor.

Declaration
public abstract T Accept<T>(ISparqlAlgebraVisitor<T> visitor)
Parameters
Type Name Description
ISparqlAlgebraVisitor<T> visitor

The visitor implementation.

Returns
Type Description
T
Type Parameters
Name Description
T

The type returned by the Visit methods of the visitor.

| Edit this page View Source

Accept<TResult, TContext>(ISparqlQueryAlgebraProcessor<TResult, TContext>, TContext)

Called by an algebra visitor to process an item by invoking the appropriate method on the processor passed in.

Declaration
public abstract TResult Accept<TResult, TContext>(ISparqlQueryAlgebraProcessor<TResult, TContext> processor, TContext context)
Parameters
Type Name Description
ISparqlQueryAlgebraProcessor<TResult, TContext> processor

The processor to invoke.

TContext context

The context to pass to the processor.

Returns
Type Description
TResult

The result of invoking the processor method.

Type Parameters
Name Description
TResult

The type of result returned by the processor.

TContext

The type of the context object to be provided to the processor.

| Edit this page View Source

CompareTo(ITriplePattern)

Compares a Triple Pattern to another Triple Pattern.

Declaration
public virtual int CompareTo(ITriplePattern other)
Parameters
Type Name Description
ITriplePattern other

Other Triple Pattern.

Returns
Type Description
int
Remarks

The aim of this function is to sort Triple Patterns into what is hopefully an optimal order such that during execution the query space is restricted as early as possible.

The basic rules of this are as follows:.

  1. Patterns with fewer variables should be executed first
  2. Patterns using the same variables should be executed in sequence
  3. Patterns using indexes which are considered more useful should be executed first
| 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()

Implements

ITriplePattern
IComparable<T>
IProcessable
IVisitable

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Fields
    • _vars
  • Properties
    • FixedVariables
    • FloatingVariables
    • HasNoBlankVariables
    • IsAcceptAll
    • PatternType
    • UsesDefaultDataset
    • Variables
  • Methods
    • Accept<T>(ISparqlAlgebraVisitor<T>)
    • Accept<TResult, TContext>(ISparqlQueryAlgebraProcessor<TResult, TContext>, TContext)
    • CompareTo(ITriplePattern)
    • ToString()
  • Implements
  • Extension Methods
Back to top Generated by DocFX