public class HTTPRepository extends AbstractRepository implements HttpClientDependent, SessionManagerDependent
This repository proxy uses a Sesame-specific extension of the SPARQL
1.1 Protocol to communicate with the server. For communicating with a non-Sesame-based SPARQL endpoint,
it is recommend to use SPARQLRepository
instead.
UnauthorizedExceptionlogger| Constructor and Description |
|---|
HTTPRepository(String repositoryURL) |
HTTPRepository(String serverURL,
String repositoryID) |
| Modifier and Type | Method and Description |
|---|---|
protected RDF4JProtocolSession |
createHTTPClient()
Creates a new HTTPClient object.
|
RepositoryConnection |
getConnection() |
File |
getDataDir() |
org.apache.http.client.HttpClient |
getHttpClient() |
HttpClientSessionManager |
getHttpClientSessionManager() |
RDFFormat |
getPreferredRDFFormat()
Indicates the current preferred
RDFFormat. |
TupleQueryResultFormat |
getPreferredTupleQueryResultFormat()
Indicates the current preferred
TupleQueryResultFormat. |
String |
getRepositoryURL() |
ValueFactory |
getValueFactory() |
protected void |
initializeInternal() |
boolean |
isWritable() |
void |
setDataDir(File dataDir) |
void |
setHttpClient(org.apache.http.client.HttpClient httpClient) |
void |
setHttpClientSessionManager(HttpClientSessionManager client) |
void |
setPreferredRDFFormat(RDFFormat format)
Sets the preferred serialization format for RDF to the supplied
RDFFormat, overriding the
SPARQLProtocolSession's default preference. |
void |
setPreferredTupleQueryResultFormat(TupleQueryResultFormat format)
Sets the preferred serialization format for tuple query results to the supplied
TupleQueryResultFormat, overriding the SPARQLProtocolSession 's default preference. |
void |
setUsernameAndPassword(String username,
String password)
Set the username and password to use for authenticating with the remote repository.
|
protected void |
shutDownInternal() |
initialize, isInitialized, shutDownclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSesameClient, setSesameClientpublic HTTPRepository(String repositoryURL)
public void setDataDir(File dataDir)
setDataDir in interface Repositorypublic File getDataDir()
getDataDir in interface Repositorypublic HttpClientSessionManager getHttpClientSessionManager()
getHttpClientSessionManager in interface SesameClientDependentgetHttpClientSessionManager in interface SessionManagerDependentpublic void setHttpClientSessionManager(HttpClientSessionManager client)
setHttpClientSessionManager in interface SesameClientDependentsetHttpClientSessionManager in interface SessionManagerDependentpublic final org.apache.http.client.HttpClient getHttpClient()
getHttpClient in interface HttpClientDependentpublic void setHttpClient(org.apache.http.client.HttpClient httpClient)
setHttpClient in interface HttpClientDependentpublic ValueFactory getValueFactory()
getValueFactory in interface Repositorypublic RepositoryConnection getConnection() throws RepositoryException
getConnection in interface RepositoryRepositoryExceptionpublic boolean isWritable()
throws RepositoryException
isWritable in interface RepositoryRepositoryExceptionpublic void setPreferredTupleQueryResultFormat(TupleQueryResultFormat format)
TupleQueryResultFormat, overriding the SPARQLProtocolSession 's default preference. Setting
this parameter is not necessary in most cases as the SPARQLProtocolSession by default indicates a
preference for the most compact and efficient format available.format - the preferred TupleQueryResultFormat. If set to 'null' no explicit preference will be
stated.public TupleQueryResultFormat getPreferredTupleQueryResultFormat()
TupleQueryResultFormat.public void setPreferredRDFFormat(RDFFormat format)
RDFFormat, overriding the
SPARQLProtocolSession's default preference. Setting this parameter is not necessary in most cases as
the SPARQLProtocolSession by default indicates a preference for the most compact and efficient format
available.
Use with caution: if set to a format that does not support context serialization any context info contained in the query result will be lost.
format - the preferred RDFFormat. If set to 'null' no explicit preference will be stated.public RDFFormat getPreferredRDFFormat()
RDFFormat.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.public String getRepositoryURL()
protected void initializeInternal()
throws RepositoryException
initializeInternal in class AbstractRepositoryRepositoryExceptionprotected void shutDownInternal()
throws RepositoryException
shutDownInternal in class AbstractRepositoryRepositoryExceptionprotected RDF4JProtocolSession createHTTPClient()
Copyright © 2015-2018 Eclipse Foundation. All Rights Reserved.