Class BaseTriplePattern
Base class for representing all types of Triple Patterns in SPARQL queries.
Inheritance
System.Object
BaseTriplePattern
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: VDS.RDF.Query.Patterns
Assembly: dotNetRDF.dll
Syntax
public abstract class BaseTriplePattern : ITriplePattern, IComparable<ITriplePattern>
Fields
| Improve this Doc View Source_vars
Stores the list of variables that are used in the Pattern.
Declaration
protected List<string> _vars
Field Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.String> |
Properties
| Improve this Doc View SourceFixedVariables
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 |
|---|---|
| System.Collections.Generic.IEnumerable<System.String> |
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 |
|---|---|
| System.Collections.Generic.IEnumerable<System.String> |
HasNoBlankVariables
Gets whether the Pattern has no blank variables.
Declaration
public abstract bool HasNoBlankVariables { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsAcceptAll
Returns whether the Triple Pattern is an accept all.
Declaration
public abstract bool IsAcceptAll { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
PatternType
Gets the Triple Pattern Type.
Declaration
public abstract TriplePatternType PatternType { get; }
Property Value
| Type | Description |
|---|---|
| TriplePatternType |
UsesDefaultDataset
Gets whether a Triple Pattern is Thread Safe when evaluated.
Declaration
public virtual bool UsesDefaultDataset { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
Almost all Triple Patterns are Thread Safe unless they are subquery patterns which themselves are not thread safe.
|
Improve this Doc
View Source
Variables
Gets the List of Variables used in the Pattern.
Declaration
public List<string> Variables { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.String> |
Remarks
These are sorted in alphabetical order.
Methods
| Improve this Doc View SourceCompareTo(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 |
|---|---|
| System.Int32 |
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:.
- Patterns with fewer variables should be executed first
- Patterns using the same variables should be executed in sequence
- Patterns using indexes which are considered more useful should be executed first
Evaluate(SparqlEvaluationContext)
Evaluates the Triple Pattern in the given Evaluation Context.
Declaration
public abstract void Evaluate(SparqlEvaluationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| SparqlEvaluationContext | context | Evaluation Context. |
ToString()
Gets the String representation of the Pattern.
Declaration
public abstract override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |
Overrides
System.Object.ToString()
Implements
System.IComparable<T>