Show / Hide Table of Contents

Class TriplePattern

Class for representing Triple Patterns in SPARQL Queries.

Inheritance
object
BaseTriplePattern
TriplePattern
Implements
IMatchTriplePattern
IComparable<IMatchTriplePattern>
IConstructTriplePattern
ITriplePattern
IComparable<ITriplePattern>
IProcessable
IVisitable
IComparable<TriplePattern>
Inherited Members
BaseTriplePattern._vars
BaseTriplePattern.Variables
BaseTriplePattern.CompareTo(ITriplePattern)
BaseTriplePattern.UsesDefaultDataset
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 TriplePattern : BaseTriplePattern, IMatchTriplePattern, IComparable<IMatchTriplePattern>, IConstructTriplePattern, ITriplePattern, IComparable<ITriplePattern>, IProcessable, IVisitable, IComparable<TriplePattern>

Constructors

| Edit this page View Source

TriplePattern(PatternItem, PatternItem, PatternItem)

Creates a new Triple Pattern.

Declaration
public TriplePattern(PatternItem subj, PatternItem pred, PatternItem obj)
Parameters
Type Name Description
PatternItem subj

Subject Pattern.

PatternItem pred

Predicate Pattern.

PatternItem obj

Object Pattern.

Properties

| Edit this page View Source

FixedVariables

Returns all variables mentioned as a match guarantees all variables are bound.

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

FloatingVariables

Returns an empty enumeration as a match guarantees all variables are bound.

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

HasNoBlankVariables

Gets whether the Pattern contains no Explicit Variables (i.e. Blank Node Variables are ignored).

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

HasNoExplicitVariables

Gets whether the Pattern contains no Explicit Variables (i.e. Blank Node Variables are ignored).

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

HasNoVariables

Gets whether the Pattern contains no Variables of any kind.

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

IndexType

Gets the Index Type we will use for this Pattern.

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

IsAcceptAll

Returns whether the Triple Pattern is an accept all.

Declaration
public override bool IsAcceptAll { get; }
Property Value
Type Description
bool
Overrides
BaseTriplePattern.IsAcceptAll
Remarks

True if all three Pattern Items are VariablePattern and all the Variables names are distinct.

| Edit this page View Source

Object

Object Pattern.

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

PatternType

Gets the pattern type.

Declaration
public override TriplePatternType PatternType { get; }
Property Value
Type Description
TriplePatternType
Overrides
BaseTriplePattern.PatternType
| Edit this page View Source

Predicate

Predicate Pattern.

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

Subject

Subject Pattern.

Declaration
public PatternItem Subject { get; }
Property Value
Type Description
PatternItem

Methods

| Edit this page View Source

Accept<T>(ISparqlAlgebraVisitor<T>)

Accept a simple algebra visitor.

Declaration
public override 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.

Overrides
BaseTriplePattern.Accept<T>(ISparqlAlgebraVisitor<T>)
| 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 override 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.

Overrides
BaseTriplePattern.Accept<TResult, TContext>(ISparqlQueryAlgebraProcessor<TResult, TContext>, TContext)
| Edit this page View Source

AsQuotedPatternItem()

Wrap this triple pattern as a quoted triple match pattern.

Declaration
public PatternItem AsQuotedPatternItem()
Returns
Type Description
PatternItem

A NodeMatchPattern if the subject, predicate and object of this pattern are not variables, A QuotedTriplePattern that wraps this pattern otherwise.

| Edit this page View Source

CompareTo(IMatchTriplePattern)

Compares a triple pattern to another.

Declaration
public int CompareTo(IMatchTriplePattern other)
Parameters
Type Name Description
IMatchTriplePattern other

Pattern.

Returns
Type Description
int
| Edit this page View Source

CompareTo(TriplePattern)

Compares a triple pattern to another.

Declaration
public int CompareTo(TriplePattern other)
Parameters
Type Name Description
TriplePattern other

Pattern.

Returns
Type Description
int
| Edit this page View Source

Construct(ConstructContext)

Constructs a Triple from a Set based on this Triple Pattern.

Declaration
public Triple Construct(ConstructContext context)
Parameters
Type Name Description
ConstructContext context

Construct Context.

Returns
Type Description
Triple
| Edit this page View Source

CreateResult(Triple)

Generates a Result Set for a Triple that matches the Pattern.

Declaration
public ISet CreateResult(Triple t)
Parameters
Type Name Description
Triple t

Triple.

Returns
Type Description
ISet
| Edit this page View Source

Evaluate(IPatternEvaluationContext, Triple)

Evaluates a triple match pattern against the given triple.

Declaration
public ISet Evaluate(IPatternEvaluationContext context, Triple obj)
Parameters
Type Name Description
IPatternEvaluationContext context

Evaluation Context.

Triple obj

Triple to test.

Returns
Type Description
ISet

A set of variable bindings if the obj matches, null otherwise.

| Edit this page View Source

ToString()

Gets the String representation of this Pattern.

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

Implements

IMatchTriplePattern
IComparable<T>
IConstructTriplePattern
ITriplePattern
IComparable<T>
IProcessable
IVisitable
IComparable<T>

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • TriplePattern(PatternItem, PatternItem, PatternItem)
  • Properties
    • FixedVariables
    • FloatingVariables
    • HasNoBlankVariables
    • HasNoExplicitVariables
    • HasNoVariables
    • IndexType
    • IsAcceptAll
    • Object
    • PatternType
    • Predicate
    • Subject
  • Methods
    • Accept<T>(ISparqlAlgebraVisitor<T>)
    • Accept<TResult, TContext>(ISparqlQueryAlgebraProcessor<TResult, TContext>, TContext)
    • AsQuotedPatternItem()
    • CompareTo(IMatchTriplePattern)
    • CompareTo(TriplePattern)
    • Construct(ConstructContext)
    • CreateResult(Triple)
    • Evaluate(IPatternEvaluationContext, Triple)
    • ToString()
  • Implements
  • Extension Methods
Back to top Generated by DocFX