SemWeb : SemWeb.Remote Namespace
SparqlHttpSource Class

This class is used to access data remotely via the SPARQL Protocol.

public class SparqlHttpSource : SemWeb.QueryableSource, SparqlSource

Remarks

The SparqlHttpSource accesses remote data using the SPARQL Protocol over HTTP.

SPARQL has some serious limitations regarding blank nodes. Critically, a blank node returned by a SPARQL query cannot be referenced in future queries. As a result, blank nodes returned by calls to this source cannot be used in future select calls to this source.

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.0, 1.0.6.2

Members

See Also: Inherited members from object.

Public Constructors

Creates a new SPARQL data source ready to connect to the SPARQL server at the given URL.

Public Properties

[read-only]
Distinct bool . Returns whether Select calls return only unique statements.

Public Methods

Contains (SemWeb.Resource) : bool
Returns whether the endpoint mentions a resource.
Contains (SemWeb.Statement) : bool
Issues an ASK query to see whether any statements matching a template are contained within the endpoint.
MetaQuery (SemWeb.Statement[], SemWeb.Query.QueryOptions) : SemWeb.Query.MetaQueryResult
Documentation for this section has not yet been entered.
static
ParseSparqlResponse (System.IO.Stream, SemWeb.Query.QueryResultSink)
Documentation for this section has not yet been entered.
static
ParseSparqlResponse (System.IO.Stream, out bool)
Documentation for this section has not yet been entered.
Query (SemWeb.Statement[], SemWeb.Query.QueryOptions, SemWeb.Query.QueryResultSink)
Documentation for this section has not yet been entered.
RunSparqlQuery (string, SemWeb.Query.QueryResultSink)
Documentation for this section has not yet been entered.
RunSparqlQuery (string, SemWeb.StatementSink)
Documentation for this section has not yet been entered.
RunSparqlQuery (string, out bool)
Documentation for this section has not yet been entered.
RunSparqlQuery (string, System.IO.TextWriter)
Documentation for this section has not yet been entered.
Select (SemWeb.StatementSink)
Selects all of the statements in the endpoint.
Select (SemWeb.SelectFilter, SemWeb.StatementSink)
Documentation for this section has not yet been entered.
Select (SemWeb.Statement, SemWeb.StatementSink)
Selects matching statements from the endpoint.

Member Details

SparqlHttpSource Constructor

Creates a new SPARQL data source ready to connect to the SPARQL server at the given URL.

public SparqlHttpSource (string url)

Parameters

url
The URL to a SPARQL Protocol server.

Remarks

A new HTTP connection is created on each call to a method in this class.

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

Contains Method

Returns whether the endpoint mentions a resource.

public bool Contains (SemWeb.Resource resource)

Parameters

resource
An entity or literal.

Returns

Whether the endpoint has any statements mentioning the given resource.

Remarks

Due to the nature of RDF and the limitations of SPARQL, passing a BNode to this method will immediately return false. There is no way to include a BNode from the remote store inside a query.

This method currently throws NotImplementedException. Sorry! (If you want the method, feel free to submit a patch!)

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

Contains Method

Issues an ASK query to see whether any statements matching a template are contained within the endpoint.

public bool Contains (SemWeb.Statement template)

Parameters

template
A statement with possibly null fields to turn into an ASK query.

Returns

A boolean indicating whether any statements matching the template are contained in the endpoint.

Remarks

An ASK query of the following form is used: "ASK WHERE { ?subject ?predicate ?object }" where any of the variables is the resource in the statement template if the template has a corresponding non-null field

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

Distinct Property

Returns whether Select calls return only unique statements.

public bool Distinct { get; }

Value

False.

Remarks

This method always returns false.

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

MetaQuery Method

Documentation for this section has not yet been entered.

Parameters

graph
Documentation for this section has not yet been entered.
options
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

ParseSparqlResponse Method

Documentation for this section has not yet been entered.

public static void ParseSparqlResponse (System.IO.Stream sparqlResponse, SemWeb.Query.QueryResultSink queryResults)

Parameters

sparqlResponse
Documentation for this section has not yet been entered.
queryResults
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

ParseSparqlResponse Method

Documentation for this section has not yet been entered.

public static void ParseSparqlResponse (System.IO.Stream sparqlResponse, out bool askResult)

Parameters

sparqlResponse
Documentation for this section has not yet been entered.
askResult
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

Query Method

Documentation for this section has not yet been entered.

Parameters

graph
Documentation for this section has not yet been entered.
options
Documentation for this section has not yet been entered.
sink
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

RunSparqlQuery Method

Documentation for this section has not yet been entered.

public void RunSparqlQuery (string sparqlQuery, SemWeb.Query.QueryResultSink selectResults)

Parameters

sparqlQuery
Documentation for this section has not yet been entered.
selectResults
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

RunSparqlQuery Method

Documentation for this section has not yet been entered.

public void RunSparqlQuery (string sparqlQuery, SemWeb.StatementSink statementResults)

Parameters

sparqlQuery
Documentation for this section has not yet been entered.
statementResults
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

RunSparqlQuery Method

Documentation for this section has not yet been entered.

public void RunSparqlQuery (string sparqlQuery, out bool askResult)

Parameters

sparqlQuery
Documentation for this section has not yet been entered.
askResult
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

RunSparqlQuery Method

Documentation for this section has not yet been entered.

public void RunSparqlQuery (string sparqlQuery, System.IO.TextWriter output)

Parameters

sparqlQuery
Documentation for this section has not yet been entered.
output
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

Select Method

Selects all of the statements in the endpoint.

public void Select (SemWeb.StatementSink sink)

Parameters

sink
A StatementSink.

Remarks

Issues a "SELECT ?subject ?predicate ?object WHERE { ?subject ?predicate ?object }" query to retreive all statements in the endpoint.

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

Select Method

Documentation for this section has not yet been entered.

public void Select (SemWeb.SelectFilter filter, SemWeb.StatementSink sink)

Parameters

filter
Documentation for this section has not yet been entered.
sink
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

Select Method

Selects matching statements from the endpoint.

public void Select (SemWeb.Statement template, SemWeb.StatementSink sink)

Parameters

template
A statement template.
sink
A StatementSink to receive the matching statements.

Remarks

Issues a "SELECT ?subject ?predicate ?object WHERE { ?subject ?predicate ?object }" query, where the variables may be replaced by values from the template if the template has a corresponding non-null field, to retreive matching statements in the endpoint.

Requirements

Namespace: SemWeb.Remote
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2