public class SPARQLRepository extends RepositoryBase implements HttpClientDependent, SesameClientDependent
| Constructor and Description |
|---|
SPARQLRepository(String endpointUrl)
Create a new SPARQLRepository using the supplied endpoint URL for queries
and updates.
|
SPARQLRepository(String queryEndpointUrl,
String updateEndpointUrl)
Create a new SPARQLREpository using the supplied query endpoint URL for
queries, and the supplied update endpoint URL for updates.
|
| Modifier and Type | Method and Description |
|---|---|
protected SparqlSession |
createHTTPClient()
Creates a new HTTPClient object.
|
void |
enableQuadMode(boolean flag)
Activate quad mode for this
SPARQLRepository, i.e. |
Map<String,String> |
getAdditionalHttpHeaders()
Get the additional HTTP headers which will be used
|
RepositoryConnection |
getConnection() |
File |
getDataDir() |
org.apache.http.client.HttpClient |
getHttpClient() |
SesameClient |
getSesameClient() |
ValueFactory |
getValueFactory() |
protected void |
initializeInternal() |
boolean |
isWritable() |
void |
setAdditionalHttpHeaders(Map<String,String> additionalHttpHeaders)
Set additional HTTP headers to be included in every request to the server,
which may be required for certain unusual server configurations.
|
void |
setDataDir(File dataDir) |
void |
setHttpClient(org.apache.http.client.HttpClient httpClient) |
void |
setSesameClient(SesameClient client) |
void |
setUsernameAndPassword(String username,
String password)
Set the username and password to use for authenticating with the remote
repository.
|
protected void |
shutDownInternal() |
String |
toString() |
initialize, isInitialized, shutDownpublic SPARQLRepository(String endpointUrl)
endpointUrl - a SPARQL endpoint URL. May not be null.public SPARQLRepository(String queryEndpointUrl, String updateEndpointUrl)
queryEndpointUrl - a SPARQL endpoint URL for queries. May not be null.updateEndpointUrl - a SPARQL endpoint URL for updates. May not be null.IllegalArgumentException - if one of the supplied endpoint URLs is null.public SesameClient getSesameClient()
getSesameClient in interface SesameClientDependentpublic void setSesameClient(SesameClient client)
setSesameClient in interface SesameClientDependentpublic final org.apache.http.client.HttpClient getHttpClient()
getHttpClient in interface HttpClientDependentpublic void setHttpClient(org.apache.http.client.HttpClient httpClient)
setHttpClient in interface HttpClientDependentprotected SparqlSession createHTTPClient()
public RepositoryConnection getConnection() throws RepositoryException
getConnection in interface RepositoryRepositoryExceptionpublic File getDataDir()
getDataDir in interface Repositorypublic ValueFactory getValueFactory()
getValueFactory in interface Repositoryprotected void initializeInternal()
throws RepositoryException
initializeInternal in class RepositoryBaseRepositoryExceptionpublic boolean isWritable()
throws RepositoryException
isWritable in interface RepositoryRepositoryExceptionpublic void setDataDir(File dataDir)
setDataDir in interface Repositorypublic void setUsernameAndPassword(String username, String password)
username - the username. Setting this to null will disable authentication.password - the password. Setting this to null will disable authentication.protected void shutDownInternal()
throws RepositoryException
shutDownInternal in class RepositoryBaseRepositoryExceptionpublic Map<String,String> getAdditionalHttpHeaders()
public void setAdditionalHttpHeaders(Map<String,String> additionalHttpHeaders)
getConnection().additionalHttpHeaders - a map containing pairs of header names and values. May be nullpublic void enableQuadMode(boolean flag)
SPARQLRepository, i.e. for
retrieval of statements also retrieve the graph.
Note: the setting is only applied in newly created SPARQLConnections
as the setting is an immutable configuration of a connection instance.
flag - flag to enable or disable the quad modeSPARQLConnection.getStatements(org.openrdf.model.Resource, org.openrdf.model.URI, org.openrdf.model.Value, boolean, org.openrdf.model.Resource...)Copyright © 2001-2016 Aduna. All Rights Reserved.