Show / Hide Table of Contents

Class PathEvaluationContext

Evaluation Context for evaluating complex property paths in SPARQL.

Inheritance
object
PathEvaluationContext
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF.Query.Paths
Assembly: dotNetRdf.dll
Syntax
public class PathEvaluationContext

Constructors

| Edit this page View Source

PathEvaluationContext(PathEvaluationContext)

Creates a new Path Evaluation Context copied from the given Context.

Declaration
public PathEvaluationContext(PathEvaluationContext context)
Parameters
Type Name Description
PathEvaluationContext context

Path Evaluation Context.

| Edit this page View Source

PathEvaluationContext(SparqlEvaluationContext, PatternItem, PatternItem)

Creates a new Path Evaluation Context.

Declaration
public PathEvaluationContext(SparqlEvaluationContext context, PatternItem start, PatternItem end)
Parameters
Type Name Description
SparqlEvaluationContext context

SPARQL Evaluation Context.

PatternItem start

End point of the Path.

PatternItem end

Start point of the Path.

Properties

| Edit this page View Source

CanAbortEarly

Gets whether pattern evaluation can be aborted early.

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

Useful when both the start and end of the path are fixed (non-variables) which means that we can stop evaluating once we find the path (if it exists).

| Edit this page View Source

CompletePaths

Gets the hash set of complete paths generated so far.

Declaration
public HashSet<PotentialPath> CompletePaths { get; }
Property Value
Type Description
HashSet<PotentialPath>
| Edit this page View Source

IsFirst

Gets/Sets whether this is the first part of the Path to be evaluated.

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

IsLast

Gets/Sets whether this is the last part of the Path to be evaluated.

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

IsReversed

Gets/Sets whether the Path is currently reversed.

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

PathEnd

Gets the pattern which is the end of the path.

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

PathStart

Gets the pattern which is the start of the path.

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

Paths

Gets the hash set of incomplete paths generated so far.

Declaration
public HashSet<PotentialPath> Paths { get; }
Property Value
Type Description
HashSet<PotentialPath>
| Edit this page View Source

PermitsNewPaths

Gets/Sets whether new paths can be introduced when not evaluating the first part of the path.

Declaration
public bool PermitsNewPaths { get; set; }
Property Value
Type Description
bool
Remarks

This is required when we have a path like ?x foaf:knows* /foaf:knows ?y and ?x is not bound prior to the path being executed. Since we permit zero-length paths we should return the names of everyone even if they don't know anyone.

The cases where ?x is already bound are handled elsewhere as we can just introduce zero-length paths for every existing binding for ?x.

| Edit this page View Source

SparqlContext

Gets the SPARQL Evaluation Context.

Declaration
public SparqlEvaluationContext SparqlContext { get; }
Property Value
Type Description
SparqlEvaluationContext

Methods

| Edit this page View Source

AddCompletePath(PotentialPath)

Adds a new path to the list of complete paths.

Declaration
public void AddCompletePath(PotentialPath p)
Parameters
Type Name Description
PotentialPath p

Path.

| Edit this page View Source

AddPath(PotentialPath)

Adds a new path to the list of current incomplete paths.

Declaration
public void AddPath(PotentialPath p)
Parameters
Type Name Description
PotentialPath p

Path.

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • PathEvaluationContext(PathEvaluationContext)
    • PathEvaluationContext(SparqlEvaluationContext, PatternItem, PatternItem)
  • Properties
    • CanAbortEarly
    • CompletePaths
    • IsFirst
    • IsLast
    • IsReversed
    • PathEnd
    • PathStart
    • Paths
    • PermitsNewPaths
    • SparqlContext
  • Methods
    • AddCompletePath(PotentialPath)
    • AddPath(PotentialPath)
  • Extension Methods
Back to top Generated by DocFX