Class SparqlEvaluationContext
Stores information about the Evaluation of a Query during it's evaluation.
Inheritance
System.Object
SparqlEvaluationContext
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)
System.Object.ToString()
Namespace: VDS.RDF.Query
Assembly: dotNetRDF.dll
Syntax
public class SparqlEvaluationContext
Constructors
| Improve this Doc View SourceSparqlEvaluationContext(SparqlQuery, ISparqlDataset)
Creates a new Evaluation Context for the given Query over the given Dataset.
Declaration
public SparqlEvaluationContext(SparqlQuery q, ISparqlDataset data)
Parameters
| Type | Name | Description |
|---|---|---|
| SparqlQuery | q | Query. |
| ISparqlDataset | data | Dataset. |
SparqlEvaluationContext(SparqlQuery, ISparqlDataset, ISparqlQueryAlgebraProcessor<BaseMultiset, SparqlEvaluationContext>)
Creates a new Evaluation Context for the given Query over the given Dataset using a specific processor.
Declaration
public SparqlEvaluationContext(SparqlQuery q, ISparqlDataset data, ISparqlQueryAlgebraProcessor<BaseMultiset, SparqlEvaluationContext> processor)
Parameters
| Type | Name | Description |
|---|---|---|
| SparqlQuery | q | Query. |
| ISparqlDataset | data | Dataset. |
| ISparqlQueryAlgebraProcessor<BaseMultiset, SparqlEvaluationContext> | processor | Query Processor. |
SparqlEvaluationContext(SparqlResultBinder)
Creates a new Evaluation Context which is a Container for the given Result Binder.
Declaration
public SparqlEvaluationContext(SparqlResultBinder binder)
Parameters
| Type | Name | Description |
|---|---|---|
| SparqlResultBinder | binder |
Properties
| Improve this Doc View SourceBinder
Gets/Sets the Results Binder.
Declaration
public SparqlResultBinder Binder { get; set; }
Property Value
| Type | Description |
|---|---|
| SparqlResultBinder |
Data
Gets the Dataset the query is over.
Declaration
public ISparqlDataset Data { get; }
Property Value
| Type | Description |
|---|---|
| ISparqlDataset |
InputMultiset
Gets/Sets the Input Multiset.
Declaration
public BaseMultiset InputMultiset { get; set; }
Property Value
| Type | Description |
|---|---|
| BaseMultiset |
Item[String]
Gets/Sets a Object that should be persisted over the entire Evaluation Context.
Declaration
public object this[string key] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key | Key. |
Property Value
| Type | Description |
|---|---|
| System.Object |
Remarks
May be used by parts of the Evaluation Process that need to ensure a persistent state across the entire Evaluation Query (e.g. the implementation of the BNODE() function).
|
Improve this Doc
View Source
OutputMultiset
Gets/Sets the Output Multiset.
Declaration
public BaseMultiset OutputMultiset { get; set; }
Property Value
| Type | Description |
|---|---|
| BaseMultiset |
Processor
Gets the custom query processor that is in use (if any).
Declaration
public ISparqlQueryAlgebraProcessor<BaseMultiset, SparqlEvaluationContext> Processor { get; }
Property Value
| Type | Description |
|---|---|
| ISparqlQueryAlgebraProcessor<BaseMultiset, SparqlEvaluationContext> |
Query
Gets the Query that is being evaluated.
Declaration
public SparqlQuery Query { get; }
Property Value
| Type | Description |
|---|---|
| SparqlQuery |
QueryTime
Retrieves the Time in milliseconds the query took to evaluate.
Declaration
public long QueryTime { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
QueryTimeout
Gets the Query Timeout used for the Query.
Declaration
public long QueryTimeout { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
Remarks
This is taken either from the Timeout property of the SparqlQuery to which this evaluation context pertains (if any) or from the global option QueryExecutionTimeout. To set the Timeout to be used set whichever of those is appropriate prior to evaluating the query. If there is a Query present then it's timeout takes precedence unless it is set to zero (no timeout) in which case the global timeout setting is applied. You cannot set the Query Timeout to be higher than the global timeout unless the global timeout is set to zero (i.e. no global timeout).
QueryTimeTicks
Retrieves the Time in ticks the query took to evaluate.
Declaration
public long QueryTimeTicks { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
RemainingTimeout
Gets the Remaining Timeout i.e. the Timeout taking into account time already elapsed.
Declaration
public long RemainingTimeout { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
Remarks
If there is no timeout then this is always zero, if there is a timeout this is always >= 1 since any operation that wants to respect the timeout must have a non-zero timeout to actually timeout properly.
|
Improve this Doc
View Source
TrimTemporaryVariables
Gets/Sets whether BGPs should trim temporary variables.
Declaration
public bool TrimTemporaryVariables { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
| Improve this Doc View SourceCheckTimeout()
Checks whether Execution should Time out.
Declaration
public void CheckTimeout()
Exceptions
| Type | Condition |
|---|---|
| RdfQueryTimeoutException | Thrown if the Query has exceeded the Execution Timeout. |
EndExecution()
Ends the Execution Timer.
Declaration
public void EndExecution()
Evaluate(ISparqlAlgebra)
Evalutes an Algebra Operator in this Context using the current Query Processor (if any) or the default Evaluate(SparqlEvaluationContext) method.
Declaration
public BaseMultiset Evaluate(ISparqlAlgebra algebra)
Parameters
| Type | Name | Description |
|---|---|---|
| ISparqlAlgebra | algebra | Algebra. |
Returns
| Type | Description |
|---|---|
| BaseMultiset |
StartExecution()
Starts the Execution Timer.
Declaration
public void StartExecution()