A Query is something that returns all of the ways a set of variables may bind to a graph. This is the abstract base class of several query methods.
|
The SemWeb.Query.GraphMatch class provides a query algorithm to match a graph with variables against another graph.
The SemWeb.Query.Sparql class provides a SPARQL query engine.
See Also: Inherited members from object.
Query
() The protected no-arg constructor used by subclasses. |
MimeType
|
string . Gets or sets the preferred MIME type for the output of the query. |
QueryMeta
|
Entity . A filter on the Meta value of statements in the target graph considered by the query. |
ReturnLimit
|
int . The number of bindings to return. |
ReturnStart
|
int . The index of the first binding to return. |
abstract |
GetExplanation
() Returns a textual explanation of the query. |
abstract |
Run
(SelectableSource, SemWeb.Query.QueryResultSink) Runs the query on a data source, outputting to a QueryResultSink. |
Run
(SelectableSource, System.IO.TextWriter) Runs the query on a data source, outputting to a TextWriter. |
The protected no-arg constructor used by subclasses.
Returns a textual explanation of the query.
The index of the first binding to return.
The number of bindings to return.
A filter on the Meta value of statements in the target graph considered by the query.
Runs the query on a data source, outputting to a QueryResultSink.
Runs the query on a data source, outputting to a TextWriter.
Gets or sets the preferred MIME type for the output of the query.
This propery returns the MIME type of the output that results from calling SemWeb.Query.Run(SemWeb.SelectableSource,System.IO.TextWriter). Output is often in the SPARQL XML Results format, so this property often returns "application/sparql-results+xml".
The SemWeb.Query.SparqlEngine class handles several different types of queries. ASK and SELECT queries return the MIME type above. CONSTRUCT and DESCRIBE queries will be output in RDF/XML format by default, and so this property returns "application/rdf+xml" for those queries.
This property can also be used to change the ouput format of queries, where supported. A MIME type that is not supported or recognized will cause the property setter to throw NotSupportedException. Always catch this exception when setting this property.
The SemWeb.GraphMatch class and SPARQL SELECT and ASK queries with the SemWeb.Query.SparqlEngine class do not support other output formats than SPARQL XML Results.
SPARQL CONSTRUCT and DESCRIBE queries with the SemWeb.Query.SparqlEngine class can be set to output in either RDF/XML or N3 format by setting this property to "application/n3" or any of the values listed in SemWeb.RdfWriter.Create(System.String,System.IO.TextWriter).