eu.larkc.core.query
Class RemoteSPARQLEndpoint

java.lang.Object
  extended by eu.larkc.core.query.RemoteSPARQLEndpoint
All Implemented Interfaces:
SPARQLEndpoint

public class RemoteSPARQLEndpoint
extends java.lang.Object
implements SPARQLEndpoint

RemoteSPARQLEndpoint class automates the result reading from a specific SPARQL endpoint available on the web.

Author:
vassil

Constructor Summary
RemoteSPARQLEndpoint(org.openrdf.model.URI uri)
           
 
Method Summary
 DataSet createDataSet(java.util.Collection<org.openrdf.model.URI> defaultGraphs, java.util.Collection<org.openrdf.model.URI> namedGraphs)
          Creates a SPARQL dataset from this endpoint.
 RdfGraph createRdfGraph(org.openrdf.model.URI graph)
          Creates a named graph from this endpoint.
 boolean executeAsk(SPARQLQuery query)
          Executes ASK query.
 SetOfStatements executeConstruct(SPARQLQuery query)
          Executes CONSTRUCT or DESCRIBE query.
 VariableBinding executeSelect(SPARQLQuery query)
          Executes SELECT query.
 java.io.InputStream sendHTTPGet(SPARQLQuery query)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteSPARQLEndpoint

public RemoteSPARQLEndpoint(org.openrdf.model.URI uri)
Method Detail

createDataSet

public DataSet createDataSet(java.util.Collection<org.openrdf.model.URI> defaultGraphs,
                             java.util.Collection<org.openrdf.model.URI> namedGraphs)
Description copied from interface: SPARQLEndpoint
Creates a SPARQL dataset from this endpoint.

Specified by:
createDataSet in interface SPARQLEndpoint
Parameters:
defaultGraphs - is list of default graphs
namedGraphs - is a list of named graphs
Returns:
dataset

createRdfGraph

public RdfGraph createRdfGraph(org.openrdf.model.URI graph)
Description copied from interface: SPARQLEndpoint
Creates a named graph from this endpoint.

Specified by:
createRdfGraph in interface SPARQLEndpoint
Parameters:
graph - is the URI of the named graph
Returns:
named graph

executeAsk

public boolean executeAsk(SPARQLQuery query)
Description copied from interface: SPARQLEndpoint
Executes ASK query. If the submitted query is not ASK a runtime exception will be generated.

Specified by:
executeAsk in interface SPARQLEndpoint
Parameters:
query - is ask query to be executed
Returns:
true or false

executeConstruct

public SetOfStatements executeConstruct(SPARQLQuery query)
Description copied from interface: SPARQLEndpoint
Executes CONSTRUCT or DESCRIBE query. If the submitted query is not CONSTRUCT or DESCRIBE a runtime exception will be generated.

Specified by:
executeConstruct in interface SPARQLEndpoint
Parameters:
query - is construct or describe query to be executed
Returns:
set of rdf statements

executeSelect

public VariableBinding executeSelect(SPARQLQuery query)
Description copied from interface: SPARQLEndpoint
Executes SELECT query. If the submitted query is not SELECT a runtime exception will be generated.

Specified by:
executeSelect in interface SPARQLEndpoint
Parameters:
query - is select query to be executed
Returns:
list of solutions

sendHTTPGet

public java.io.InputStream sendHTTPGet(SPARQLQuery query)