public class SPARQLRepository extends RepositoryBase
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 HTTPClient |
createHTTPClient()
Creates a new HTTPClient object.
|
Map<String,String> |
getAdditionalHttpHeaders() |
RepositoryConnection |
getConnection()
Opens a connection to this repository that can be used for querying and
updating the contents of the repository.
|
File |
getDataDir()
Get the directory where data and logging for this repository is stored.
|
protected HTTPClient |
getHTTPClient() |
ValueFactory |
getValueFactory()
Gets a ValueFactory for this Repository.
|
protected void |
initializeInternal() |
boolean |
isWritable()
Checks whether this repository is writable, i.e.
|
void |
setAdditionalHttpHeaders(Map<String,String> additionalHttpHeaders) |
void |
setDataDir(File dataDir)
Set the directory where data and logging for this repository is stored.
|
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, shutDown
public 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.protected HTTPClient createHTTPClient()
public RepositoryConnection getConnection() throws RepositoryException
Repository
Connection con = repository.getConnection(); try { // perform operations on the connection } finally { con.close(); }
RepositoryException
- If something went wrong during the creation of the Connection.public File getDataDir()
Repository
public ValueFactory getValueFactory()
Repository
protected void initializeInternal() throws RepositoryException
initializeInternal
in class RepositoryBase
RepositoryException
public boolean isWritable() throws RepositoryException
Repository
RepositoryException
public void setDataDir(File dataDir)
Repository
dataDir
- the directory where data for this repository is storedprotected HTTPClient getHTTPClient()
public 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 RepositoryBase
RepositoryException
public Map<String,String> getAdditionalHttpHeaders()
Copyright © 2001-2013 Aduna. All Rights Reserved.