com.hp.hpl.jena.sparql.engine.http
Class QueryEngineHTTP

java.lang.Object
  extended by com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP
All Implemented Interfaces:
QueryExecution

public class QueryEngineHTTP
extends Object
implements QueryExecution


Field Summary
static String QUERY_MIME_TYPE
           
 
Constructor Summary
QueryEngineHTTP(String serviceURI, Query query)
           
QueryEngineHTTP(String serviceURI, String queryString)
           
 
Method Summary
 void abort()
          Stop in mid execution.
 void addDefaultGraph(String defaultGraph)
           
 void addNamedGraph(String name)
           
 void addParam(String field, String value)
           
 void close()
          Close the query execution and stop query evaluation as soon as convenient.
 boolean execAsk()
          Execute an ASK query
 com.hp.hpl.jena.rdf.model.Model execConstruct()
          Execute a CONSTRUCT query
 com.hp.hpl.jena.rdf.model.Model execConstruct(com.hp.hpl.jena.rdf.model.Model model)
          Execute a CONSTRUCT query, putting the statements into 'model'.
 com.hp.hpl.jena.rdf.model.Model execDescribe()
          Execute a DESCRIBE query
 com.hp.hpl.jena.rdf.model.Model execDescribe(com.hp.hpl.jena.rdf.model.Model model)
          Execute a DESCRIBE query, putting the statements into 'model'.
 ResultSet execSelect()
          Execute a SELECT query
 Context getContext()
          The properties associated with a query execution - implementation specific parameters This includes Java objects (so it is not an RDF graph).
 Dataset getDataset()
          The dataset against which the query will execute.
 void setBasicAuthentication(String user, char[] password)
          Set user and password for basic authentication.
 void setDefaultGraphURIs(List<String> defaultGraphURIs)
           
 void setFileManager(com.hp.hpl.jena.util.FileManager fm)
          Set the FileManger that might be used to load files.
 void setInitialBinding(QuerySolution binding)
          Set the initial association of variables and values.
 void setInitialBindings(ResultSet table)
           
 void setNamedGraphURIs(List<String> namedGraphURIs)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_MIME_TYPE

public static final String QUERY_MIME_TYPE
See Also:
Constant Field Values
Constructor Detail

QueryEngineHTTP

public QueryEngineHTTP(String serviceURI,
                       Query query)

QueryEngineHTTP

public QueryEngineHTTP(String serviceURI,
                       String queryString)
Method Detail

setFileManager

public void setFileManager(com.hp.hpl.jena.util.FileManager fm)
Description copied from interface: QueryExecution
Set the FileManger that might be used to load files. May not be supported by all QueryExecution implementations.

Specified by:
setFileManager in interface QueryExecution

setInitialBinding

public void setInitialBinding(QuerySolution binding)
Description copied from interface: QueryExecution
Set the initial association of variables and values. May not be supported by all QueryExecution implementations.

Specified by:
setInitialBinding in interface QueryExecution

setInitialBindings

public void setInitialBindings(ResultSet table)

setDefaultGraphURIs

public void setDefaultGraphURIs(List<String> defaultGraphURIs)
Parameters:
defaultGraphURIs - The defaultGraphURIs to set.

setNamedGraphURIs

public void setNamedGraphURIs(List<String> namedGraphURIs)
Parameters:
namedGraphURIs - The namedGraphURIs to set.

addParam

public void addParam(String field,
                     String value)

addDefaultGraph

public void addDefaultGraph(String defaultGraph)
Parameters:
defaultGraph - The defaultGraph to add.

addNamedGraph

public void addNamedGraph(String name)
Parameters:
name - The URI to add.

setBasicAuthentication

public void setBasicAuthentication(String user,
                                   char[] password)
Set user and password for basic authentication. After the request is made (one of the exec calls), the application can overwrite the password array to remove details of the secret.

Parameters:
user -
password -

execSelect

public ResultSet execSelect()
Description copied from interface: QueryExecution
Execute a SELECT query

Specified by:
execSelect in interface QueryExecution

execConstruct

public com.hp.hpl.jena.rdf.model.Model execConstruct()
Description copied from interface: QueryExecution
Execute a CONSTRUCT query

Specified by:
execConstruct in interface QueryExecution

execConstruct

public com.hp.hpl.jena.rdf.model.Model execConstruct(com.hp.hpl.jena.rdf.model.Model model)
Description copied from interface: QueryExecution
Execute a CONSTRUCT query, putting the statements into 'model'.

Specified by:
execConstruct in interface QueryExecution
Returns:
Model The model argument for casaded code.

execDescribe

public com.hp.hpl.jena.rdf.model.Model execDescribe()
Description copied from interface: QueryExecution
Execute a DESCRIBE query

Specified by:
execDescribe in interface QueryExecution

execDescribe

public com.hp.hpl.jena.rdf.model.Model execDescribe(com.hp.hpl.jena.rdf.model.Model model)
Description copied from interface: QueryExecution
Execute a DESCRIBE query, putting the statements into 'model'.

Specified by:
execDescribe in interface QueryExecution
Returns:
Model The model argument for casaded code.

execAsk

public boolean execAsk()
Description copied from interface: QueryExecution
Execute an ASK query

Specified by:
execAsk in interface QueryExecution

getContext

public Context getContext()
Description copied from interface: QueryExecution
The properties associated with a query execution - implementation specific parameters This includes Java objects (so it is not an RDF graph). Keys should be URIs as strings. May be null (this implementation does not provide any configuration).

Specified by:
getContext in interface QueryExecution

abort

public void abort()
Description copied from interface: QueryExecution
Stop in mid execution. No guarantee that the concrete implementation actual will stop or that it will do so immediately. No operations on the query execution or any associated result set are permitted after this call.

Specified by:
abort in interface QueryExecution

close

public void close()
Description copied from interface: QueryExecution
Close the query execution and stop query evaluation as soon as convenient. It is important to close query execution objects in order to release resources such as working memory and to stop the query execution. Some storage subsystems require explicit ends of operations and this operation will cause those to be called where necessary. No operations on the query execution or any associated result set are permitted after this call.

Specified by:
close in interface QueryExecution

toString

public String toString()
Overrides:
toString in class Object

getDataset

public Dataset getDataset()
Description copied from interface: QueryExecution
The dataset against which the query will execute. May be null, implying it is expected that the query itself has a dataset description.

Specified by:
getDataset in interface QueryExecution


Copyright ? 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP Copyright ? 2010 Talis Systems Ltd. Copyright ? 2010 Epimorphics Ltd.