eu.larkc.core.query
Class LocalStoreSPARQLService

java.lang.Object
  extended by eu.larkc.core.query.LocalStoreSPARQLService
All Implemented Interfaces:
SPARQLEndpoint
Direct Known Subclasses:
RdfStoreConnectionImpl

public class LocalStoreSPARQLService
extends java.lang.Object
implements SPARQLEndpoint

LocalStoreSPARQLService class implements SPARQL query evaluation over a local memory RDF Store.

Author:
vassil

Constructor Summary
LocalStoreSPARQLService(com.ontotext.ordi.tripleset.TConnection con)
           
 
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 name)
          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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalStoreSPARQLService

public LocalStoreSPARQLService(com.ontotext.ordi.tripleset.TConnection con)
Method Detail

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

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 name)
Description copied from interface: SPARQLEndpoint
Creates a named graph from this endpoint.

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