public class SesameHTTPClient extends HTTPClient
HTTPClient
subclass which bundles special functionality
for Sesame remote repositories.httpClient
Constructor and Description |
---|
SesameHTTPClient() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkRepositoryURL() |
protected void |
checkServerURL() |
void |
clearNamespaces() |
void |
deleteRepository(String repositoryID) |
TupleQueryResult |
getContextIDs() |
void |
getContextIDs(TupleQueryResultHandler handler) |
String |
getNamespace(String prefix) |
TupleQueryResult |
getNamespaces() |
void |
getNamespaces(TupleQueryResultHandler handler) |
TupleQueryResult |
getRepositoryList() |
void |
getRepositoryList(TupleQueryResultHandler handler) |
String |
getRepositoryURL() |
String |
getServerProtocol() |
String |
getServerURL() |
void |
getStatements(Resource subj,
URI pred,
Value obj,
boolean includeInferred,
RDFHandler handler,
Resource... contexts) |
String |
getUpdateURL() |
void |
removeNamespacePrefix(String prefix) |
void |
sendTransaction(Iterable<? extends TransactionOperation> txn) |
void |
setNamespacePrefix(String prefix,
String name) |
void |
setRepository(String repositoryURL) |
void |
setRepository(String serverURL,
String repositoryID) |
void |
setServerURL(String serverURL) |
void |
setUsernameAndPassword(String username,
String password)
Set the username and password for authentication with the remote server.
|
long |
size(Resource... contexts) |
void |
upload(InputStream contents,
String baseURI,
RDFFormat dataFormat,
boolean overwrite,
Resource... contexts) |
void |
upload(Reader contents,
String baseURI,
RDFFormat dataFormat,
boolean overwrite,
Resource... contexts) |
protected void |
upload(org.apache.commons.httpclient.methods.RequestEntity reqEntity,
String baseURI,
boolean overwrite,
Resource... contexts) |
execute, getAdditionalHttpHeaders, getBackgroundTupleQueryResult, getBoolean, getConnectionTimeout, getErrorInfo, getHttpClient, getParserConfig, getPreferredBooleanQueryResultFormat, getPreferredRDFFormat, getPreferredTupleQueryResultFormat, getQueryMethod, getQueryMethodParameters, getQueryURL, getRDF, getRDFBackground, getResponseMIMEType, getTupleQueryResult, getUpdateMethod, getUpdateMethodParameters, getValueFactory, initialize, is2xx, releaseConnection, sendBooleanQuery, sendBooleanQuery, sendGraphQuery, sendGraphQuery, sendGraphQuery, sendGraphQuery, sendTupleQuery, sendTupleQuery, sendTupleQuery, sendUpdate, setAdditionalHttpHeaders, setConnectionTimeout, setDoAuthentication, setParserConfig, setPreferredBooleanQueryResultFormat, setPreferredRDFFormat, setPreferredTupleQueryResultFormat, setQueryURL, setUpdateURL, setUsernameAndPasswordForUrl, setValueFactory, shutDown
public void setServerURL(String serverURL)
public String getServerURL()
public String getRepositoryURL()
public void setRepository(String repositoryURL)
protected void checkRepositoryURL()
protected void checkServerURL()
public String getUpdateURL()
getUpdateURL
in class HTTPClient
public TupleQueryResult getRepositoryList() throws IOException, RepositoryException, UnauthorizedException, QueryInterruptedException
public void getRepositoryList(TupleQueryResultHandler handler) throws IOException, TupleQueryResultHandlerException, RepositoryException, UnauthorizedException, QueryInterruptedException
public String getServerProtocol() throws IOException, RepositoryException, UnauthorizedException
public long size(Resource... contexts) throws IOException, RepositoryException, UnauthorizedException
public void deleteRepository(String repositoryID) throws org.apache.commons.httpclient.HttpException, IOException, RepositoryException
org.apache.commons.httpclient.HttpException
IOException
RepositoryException
public TupleQueryResult getNamespaces() throws IOException, RepositoryException, UnauthorizedException, QueryInterruptedException
public void getNamespaces(TupleQueryResultHandler handler) throws IOException, TupleQueryResultHandlerException, RepositoryException, UnauthorizedException, QueryInterruptedException
public String getNamespace(String prefix) throws IOException, RepositoryException, UnauthorizedException
public void setNamespacePrefix(String prefix, String name) throws IOException, RepositoryException, UnauthorizedException
public void removeNamespacePrefix(String prefix) throws IOException, RepositoryException, UnauthorizedException
public void clearNamespaces() throws IOException, RepositoryException, UnauthorizedException
public TupleQueryResult getContextIDs() throws IOException, RepositoryException, UnauthorizedException, QueryInterruptedException
public void getContextIDs(TupleQueryResultHandler handler) throws IOException, TupleQueryResultHandlerException, RepositoryException, UnauthorizedException, QueryInterruptedException
public void getStatements(Resource subj, URI pred, Value obj, boolean includeInferred, RDFHandler handler, Resource... contexts) throws IOException, RDFHandlerException, RepositoryException, UnauthorizedException, QueryInterruptedException
public void sendTransaction(Iterable<? extends TransactionOperation> txn) throws IOException, RepositoryException, UnauthorizedException
public void upload(InputStream contents, String baseURI, RDFFormat dataFormat, boolean overwrite, Resource... contexts) throws IOException, RDFParseException, RepositoryException, UnauthorizedException
public void upload(Reader contents, String baseURI, RDFFormat dataFormat, boolean overwrite, Resource... contexts) throws IOException, RDFParseException, RepositoryException, UnauthorizedException
protected void upload(org.apache.commons.httpclient.methods.RequestEntity reqEntity, String baseURI, boolean overwrite, Resource... contexts) throws IOException, RDFParseException, RepositoryException, UnauthorizedException
public void setUsernameAndPassword(String username, String password)
HTTPClient
setUsernameAndPassword
in class HTTPClient
username
- the usernamepassword
- the passwordCopyright © 2001-2013 Aduna. All Rights Reserved.