Class SparqlQuery
Represents a SPARQL Query.
Inheritance
System.Object
SparqlQuery
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)
Assembly: dotNetRDF.dll
Syntax
public sealed class SparqlQuery : NodeFactory, INodeFactory
Properties
|
Improve this Doc
View Source
AlgebraOptimisers
Gets/Sets the locally scoped Algebra Optimisers that are used to optimise the Query Algebra in addition to (but before) any global optimisers (specified by
AlgebraOptimisers) that are applied.
Declaration
public IEnumerable<IAlgebraOptimiser> AlgebraOptimisers { get; set; }
Property Value
|
Improve this Doc
View Source
BaseUri
Gets/Sets the Base Uri for the Query.
Declaration
public Uri BaseUri { get; set; }
Property Value
Type |
Description |
System.Uri |
|
|
Improve this Doc
View Source
Bindings
Gets/Sets the VALUES Clause for the Query which are bindings that should be applied.
Declaration
public BindingsPattern Bindings { get; }
Property Value
|
Improve this Doc
View Source
ConstructTemplate
Gets/Sets the Construct Template for a Construct Query.
Declaration
public GraphPattern ConstructTemplate { get; }
Property Value
|
Improve this Doc
View Source
DefaultGraphs
Gets the Default Graph URIs for the Query.
Declaration
public IEnumerable<Uri> DefaultGraphs { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Uri> |
|
|
Improve this Doc
View Source
Describer
Gets/Sets the
ISparqlDescribe which provides the Describe algorithm you wish to use.
Declaration
public ISparqlDescribe Describer { get; set; }
Property Value
|
Improve this Doc
View Source
DescribeVariables
Gets the Variables, QNames and URIs used in the Describe Query.
Declaration
public IEnumerable<IToken> DescribeVariables { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<IToken> |
|
|
Improve this Doc
View Source
ExpressionFactories
Gets/Sets the locally scoped Expression Factories that may be used if the query is using the CALL() function to do dynamic function invocation.
Declaration
public IEnumerable<ISparqlCustomExpressionFactory> ExpressionFactories { get; set; }
Property Value
|
Improve this Doc
View Source
GroupBy
Gets/Sets the Grouping for the Query.
Declaration
public ISparqlGroupBy GroupBy { get; }
Property Value
|
Improve this Doc
View Source
HasDistinctModifier
Gets whether a Query has a DISTINCT modifier.
Declaration
public bool HasDistinctModifier { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
HasSolutionModifier
Gets whether the Query has a Solution Modifier (a GROUP BY, HAVING, ORDER BY, LIMIT or OFFSET).
Declaration
public bool HasSolutionModifier { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Having
Gets/Sets the Having Clause for the Query.
Declaration
public ISparqlFilter Having { get; }
Property Value
|
Improve this Doc
View Source
IsAggregate
Gets whether the Query has an Aggregate as its Result.
Declaration
public bool IsAggregate { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsOptimised
Gets whether Optimisation has been applied to the query.
Declaration
public bool IsOptimised { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsSubQuery
Gets whether this Query is a Sub-Query in another Query.
Declaration
public bool IsSubQuery { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Limit
Gets the Result Set Limit for the Query.
Declaration
public int Limit { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
NamedGraphs
Gets the Named Graph URIs for the Query.
Declaration
public IEnumerable<Uri> NamedGraphs { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Uri> |
|
|
Improve this Doc
View Source
NamespaceMap
Gets the Namespace Map for the Query.
Declaration
public NamespaceMapper NamespaceMap { get; }
Property Value
|
Improve this Doc
View Source
Offset
Gets/Sets the Result Set Offset for the Query.
Declaration
public int Offset { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
OrderBy
Gets/Sets the Ordering for the Query.
Declaration
public ISparqlOrderBy OrderBy { get; }
Property Value
|
Improve this Doc
View Source
PartialResultsOnTimeout
Gets/Sets whether Partial Results should be returned in the event of Query Timeout.
Declaration
public bool PartialResultsOnTimeout { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
PropertyFunctionFactories
Gets/Sets the locally scoped Property Function factories that may be used by the
PropertyFunctionOptimiser when generating the algebra for the query.
Declaration
public IEnumerable<IPropertyFunctionFactory> PropertyFunctionFactories { get; set; }
Property Value
|
Improve this Doc
View Source
QueryExecutionTime
Gets the Time taken to execute a Query.
Declaration
public TimeSpan? QueryExecutionTime { get; set; }
Property Value
Type |
Description |
System.Nullable<System.TimeSpan> |
|
Exceptions
Type |
Condition |
System.InvalidOperationException |
Thrown if you try and inspect the execution time before the Query has been executed. |
|
Improve this Doc
View Source
QueryType
Gets the type of the Query.
Declaration
public SparqlQueryType QueryType { get; }
Property Value
|
Improve this Doc
View Source
RootGraphPattern
Gets the top level Graph Pattern of the Query.
Declaration
public GraphPattern RootGraphPattern { get; }
Property Value
|
Improve this Doc
View Source
SpecialType
Gets the Special Type of the Query (if any).
Declaration
public SparqlSpecialQueryType SpecialType { get; }
Property Value
|
Improve this Doc
View Source
Timeout
Gets/Sets the Query Execution Timeout in milliseconds.
Declaration
public long Timeout { get; set; }
Property Value
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
UsesDefaultDataset
Gets whether a Query uses the Default Dataset against which it is evaluated.
Declaration
public bool UsesDefaultDataset { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Variables
Gets the Variables used in the Query.
Declaration
public IEnumerable<SparqlVariable> Variables { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<SparqlVariable> |
|
|
Improve this Doc
View Source
VirtualCount
The number of results that would be returned without any limit clause to a query or -1 if not supported. Defaults to the same value as the Count member.
Declaration
public int VirtualCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
|
Improve this Doc
View Source
AddDefaultGraph(Uri)
Adds a Default Graph URI.
Declaration
public void AddDefaultGraph(Uri u)
Parameters
Type |
Name |
Description |
System.Uri |
u |
Graph URI. |
|
Improve this Doc
View Source
AddNamedGraph(Uri)
Adds a Named Graph URI.
Declaration
public void AddNamedGraph(Uri u)
Parameters
Type |
Name |
Description |
System.Uri |
u |
Graph URI. |
|
Improve this Doc
View Source
ClearDefaultGraphs()
Removes all Default Graph URIs.
Declaration
public void ClearDefaultGraphs()
|
Improve this Doc
View Source
ClearNamedGraphs()
Removes all Named Graph URIs.
Declaration
public void ClearNamedGraphs()
|
Improve this Doc
View Source
Copy()
Creates a copy of the query.
Declaration
public SparqlQuery Copy()
Returns
|
Improve this Doc
View Source
Evaluate(IInMemoryQueryableStore)
Evaluates the SPARQL Query against the given Triple Store.
Declaration
[Obsolete("This method is considered obsolete, you should create an ISparqlQueryProcessor instance and invoke the ProcessQuery() method instead", true)]
public object Evaluate(IInMemoryQueryableStore data)
Parameters
Returns
Type |
Description |
System.Object |
Either a SparqlResultSet or a Graph depending on the type of query executed.
|
|
Improve this Doc
View Source
Evaluate(IRdfHandler, ISparqlResultsHandler, IInMemoryQueryableStore)
Evaluates the SPARQL Query against the given Triple Store processing the results with the appropriate handler from those provided.
Declaration
[Obsolete("This method is considered obsolete, you should create an ISparqlQueryProcessor instance and invoke the ProcessQuery() method instead", true)]
public void Evaluate(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, IInMemoryQueryableStore data)
Parameters
|
Improve this Doc
View Source
Evaluate(IRdfHandler, ISparqlResultsHandler, ISparqlDataset)
Evaluates the SPARQL Query against the given Dataset processing the results with an appropriate handler form those provided.
Declaration
[Obsolete("This method is considered obsolete, you should create an ISparqlQueryProcessor instance and invoke the ProcessQuery() method instead", true)]
public void Evaluate(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, ISparqlDataset dataset)
Parameters
|
Improve this Doc
View Source
Evaluate(ISparqlDataset)
Evaluates the SPARQL Query against the given Dataset.
Declaration
[Obsolete("This method is considered obsolete, you should create an ISparqlQueryProcessor instance and invoke the ProcessQuery() method instead", true)]
public object Evaluate(ISparqlDataset dataset)
Parameters
Returns
Type |
Description |
System.Object |
Either a SparqlResultSet or a IGraph depending on the type of query executed.
|
|
Improve this Doc
View Source
Optimise()
Applies optimisation to a Query using the default global optimiser.
Declaration
|
Improve this Doc
View Source
Optimise(IQueryOptimiser)
Applies optimisation to a Query using the specific optimiser.
Declaration
public void Optimise(IQueryOptimiser optimiser)
Parameters
|
Improve this Doc
View Source
Process(ISparqlQueryProcessor)
Processes the Query using the given Query Processor.
Declaration
public object Process(ISparqlQueryProcessor processor)
Parameters
Returns
Type |
Description |
System.Object |
|
|
Improve this Doc
View Source
ToAlgebra()
Converts the Query into it's SPARQL Algebra representation (as represented in the Leviathan API).
Declaration
public ISparqlAlgebra ToAlgebra()
Returns
|
Improve this Doc
View Source
ToString()
Generates a String representation of the Query.
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Implements
Extension Methods