org.dllearner.kb.sparql
Class ExtendedQueryEngineHTTP
java.lang.Object
org.dllearner.kb.sparql.ExtendedQueryEngineHTTP
- All Implemented Interfaces:
- com.hp.hpl.jena.query.QueryExecution
public class ExtendedQueryEngineHTTP
- extends Object
- implements com.hp.hpl.jena.query.QueryExecution
A QueryEngineHTTP that is capable of closing connections after a given timeout.
Jena now provides one on its own
QUERY_MIME_TYPE
public static final String QUERY_MIME_TYPE
- See Also:
- Constant Field Values
ExtendedQueryEngineHTTP
public ExtendedQueryEngineHTTP(String serviceURI,
com.hp.hpl.jena.query.Query query)
ExtendedQueryEngineHTTP
public ExtendedQueryEngineHTTP(String serviceURI,
String queryString)
setTimeOut
public void setTimeOut(long timeOut)
getTimeOut
public long getTimeOut()
setFileManager
public void setFileManager(com.hp.hpl.jena.util.FileManager fm)
- Specified by:
setFileManager in interface com.hp.hpl.jena.query.QueryExecution
setInitialBinding
public void setInitialBinding(com.hp.hpl.jena.query.QuerySolution binding)
- Specified by:
setInitialBinding in interface com.hp.hpl.jena.query.QueryExecution
setInitialBindings
public void setInitialBindings(com.hp.hpl.jena.query.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 com.hp.hpl.jena.query.ResultSet execSelect()
- Specified by:
execSelect in interface com.hp.hpl.jena.query.QueryExecution
execConstruct
public com.hp.hpl.jena.rdf.model.Model execConstruct()
- Specified by:
execConstruct in interface com.hp.hpl.jena.query.QueryExecution
execConstruct
public com.hp.hpl.jena.rdf.model.Model execConstruct(com.hp.hpl.jena.rdf.model.Model model)
- Specified by:
execConstruct in interface com.hp.hpl.jena.query.QueryExecution
execDescribe
public com.hp.hpl.jena.rdf.model.Model execDescribe()
- Specified by:
execDescribe in interface com.hp.hpl.jena.query.QueryExecution
execDescribe
public com.hp.hpl.jena.rdf.model.Model execDescribe(com.hp.hpl.jena.rdf.model.Model model)
- Specified by:
execDescribe in interface com.hp.hpl.jena.query.QueryExecution
execAsk
public boolean execAsk()
- Specified by:
execAsk in interface com.hp.hpl.jena.query.QueryExecution
getContext
public com.hp.hpl.jena.sparql.util.Context getContext()
- Specified by:
getContext in interface com.hp.hpl.jena.query.QueryExecution
abort
public void abort()
- Specified by:
abort in interface com.hp.hpl.jena.query.QueryExecution
close
public void close()
- Specified by:
close in interface com.hp.hpl.jena.query.QueryExecution
setTimeout
public void setTimeout(long timeout,
TimeUnit timeoutUnits)
- Specified by:
setTimeout in interface com.hp.hpl.jena.query.QueryExecution
setTimeout
public void setTimeout(long timeout)
- Specified by:
setTimeout in interface com.hp.hpl.jena.query.QueryExecution
setTimeout
public void setTimeout(long timeout1,
TimeUnit timeUnit1,
long timeout2,
TimeUnit timeUnit2)
- Specified by:
setTimeout in interface com.hp.hpl.jena.query.QueryExecution
setTimeout
public void setTimeout(long timeout1,
long timeout2)
- Specified by:
setTimeout in interface com.hp.hpl.jena.query.QueryExecution
toString
public String toString()
- Overrides:
toString in class Object
getDataset
public com.hp.hpl.jena.query.Dataset getDataset()
- Specified by:
getDataset in interface com.hp.hpl.jena.query.QueryExecution
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann