|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.http.client.HTTPClient
public class HTTPClient
Low-level HTTP client for Sesame's HTTP protocol. Methods correspond directly to the functionality offered by the protocol.
| Constructor Summary | |
|---|---|
HTTPClient()
|
|
| Method Summary | |
|---|---|
protected void |
checkRepositoryURL()
|
protected void |
checkServerURL()
|
void |
clearNamespaces()
|
protected boolean |
getBoolean(org.apache.commons.httpclient.HttpMethod method)
|
TupleQueryResult |
getContextIDs()
|
void |
getContextIDs(TupleQueryResultHandler handler)
|
protected ErrorInfo |
getErrorInfo(org.apache.commons.httpclient.HttpMethod method)
|
protected org.apache.commons.httpclient.HttpClient |
getHttpClient()
|
String |
getNamespace(String prefix)
|
TupleQueryResult |
getNamespaces()
|
void |
getNamespaces(TupleQueryResultHandler handler)
|
BooleanQueryResultFormat |
getPreferredBooleanQueryResultFormat()
Gets the preferred BooleanQueryResultFormat for encoding boolean
query results. |
RDFFormat |
getPreferredRDFFormat()
Gets the preferred RDFFormat for encoding RDF documents. |
TupleQueryResultFormat |
getPreferredTupleQueryResultFormat()
Gets the preferred TupleQueryResultFormat for encoding tuple query
results. |
protected org.apache.commons.httpclient.HttpMethod |
getQueryMethod(QueryLanguage ql,
String query,
Dataset dataset,
boolean includeInferred,
Binding... bindings)
|
protected List<org.apache.commons.httpclient.NameValuePair> |
getQueryMethodParameters(QueryLanguage ql,
String query,
Dataset dataset,
boolean includeInferred,
Binding... bindings)
|
protected void |
getRDF(org.apache.commons.httpclient.HttpMethod method,
RDFHandler handler,
boolean requireContext)
|
TupleQueryResult |
getRepositoryList()
|
void |
getRepositoryList(TupleQueryResultHandler handler)
|
String |
getRepositoryURL()
|
protected String |
getResponseMIMEType(org.apache.commons.httpclient.HttpMethod method)
Gets the MIME type specified in the response headers of the supplied method, if any. |
String |
getServerProtocol()
|
String |
getServerURL()
|
void |
getStatements(Resource subj,
URI pred,
Value obj,
boolean includeInferred,
RDFHandler handler,
Resource... contexts)
|
protected void |
getTupleQueryResult(org.apache.commons.httpclient.HttpMethod method,
TupleQueryResultHandler handler)
|
ValueFactory |
getValueFactory()
|
protected void |
releaseConnection(org.apache.commons.httpclient.HttpMethod method)
|
void |
removeNamespacePrefix(String prefix)
|
boolean |
sendBooleanQuery(QueryLanguage ql,
String query,
Dataset dataset,
boolean includeInferred,
Binding... bindings)
|
GraphQueryResult |
sendGraphQuery(QueryLanguage ql,
String query,
Dataset dataset,
boolean includeInferred,
Binding... bindings)
|
void |
sendGraphQuery(QueryLanguage ql,
String query,
Dataset dataset,
boolean includeInferred,
RDFHandler handler,
Binding... bindings)
|
void |
sendTransaction(Iterable<? extends TransactionOperation> txn)
|
TupleQueryResult |
sendTupleQuery(QueryLanguage ql,
String query,
Dataset dataset,
boolean includeInferred,
Binding... bindings)
|
void |
sendTupleQuery(QueryLanguage ql,
String query,
Dataset dataset,
boolean includeInferred,
TupleQueryResultHandler handler,
Binding... bindings)
|
protected void |
setDoAuthentication(org.apache.commons.httpclient.HttpMethod method)
|
void |
setNamespacePrefix(String prefix,
String name)
|
void |
setPreferredBooleanQueryResultFormat(BooleanQueryResultFormat format)
Sets the preferred format for encoding boolean query results. |
void |
setPreferredRDFFormat(RDFFormat format)
Sets the preferred format for encoding RDF documents. |
void |
setPreferredTupleQueryResultFormat(TupleQueryResultFormat format)
Sets the preferred format for encoding tuple query results. |
void |
setRepositoryID(String repositoryID)
|
void |
setRepositoryURL(String repositoryURL)
|
void |
setServerURL(String serverURL)
|
void |
setUsernameAndPassword(String username,
String password)
Set the username and password for authenication with the remote server. |
void |
setValueFactory(ValueFactory valueFactory)
|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HTTPClient()
| Method Detail |
|---|
protected final org.apache.commons.httpclient.HttpClient getHttpClient()
public void setValueFactory(ValueFactory valueFactory)
public ValueFactory getValueFactory()
public void setServerURL(String serverURL)
public String getServerURL()
protected void checkServerURL()
public void setRepositoryURL(String repositoryURL)
public String getRepositoryURL()
protected void checkRepositoryURL()
public void setRepositoryID(String repositoryID)
public void setPreferredTupleQueryResultFormat(TupleQueryResultFormat format)
binary format is preferred by
default.
format - The preferred TupleQueryResultFormat, or null
to indicate no specific format is preferred.public TupleQueryResultFormat getPreferredTupleQueryResultFormat()
TupleQueryResultFormat for encoding tuple query
results.
public void setPreferredRDFFormat(RDFFormat format)
Turtle format is preferred by default.
format - The preferred RDFFormat, or null to indicate no
specific format is preferred.public RDFFormat getPreferredRDFFormat()
RDFFormat for encoding RDF documents.
public void setPreferredBooleanQueryResultFormat(BooleanQueryResultFormat format)
binary format is preferred by
default.
format - The preferred BooleanQueryResultFormat, or null
to indicate no specific format is preferred.public BooleanQueryResultFormat getPreferredBooleanQueryResultFormat()
BooleanQueryResultFormat for encoding boolean
query results.
public void setUsernameAndPassword(String username,
String password)
username - the usernamepassword - the password
public String getServerProtocol()
throws IOException,
RepositoryException,
UnauthorizedException
IOException
RepositoryException
UnauthorizedException
public TupleQueryResult getRepositoryList()
throws IOException,
RepositoryException,
UnauthorizedException
IOException
RepositoryException
UnauthorizedException
public void getRepositoryList(TupleQueryResultHandler handler)
throws IOException,
TupleQueryResultHandlerException,
RepositoryException,
UnauthorizedException
IOException
TupleQueryResultHandlerException
RepositoryException
UnauthorizedException
public TupleQueryResult sendTupleQuery(QueryLanguage ql,
String query,
Dataset dataset,
boolean includeInferred,
Binding... bindings)
throws IOException,
RepositoryException,
MalformedQueryException,
UnauthorizedException
IOException
RepositoryException
MalformedQueryException
UnauthorizedException
public void sendTupleQuery(QueryLanguage ql,
String query,
Dataset dataset,
boolean includeInferred,
TupleQueryResultHandler handler,
Binding... bindings)
throws IOException,
TupleQueryResultHandlerException,
RepositoryException,
MalformedQueryException,
UnauthorizedException
IOException
TupleQueryResultHandlerException
RepositoryException
MalformedQueryException
UnauthorizedException
public GraphQueryResult sendGraphQuery(QueryLanguage ql,
String query,
Dataset dataset,
boolean includeInferred,
Binding... bindings)
throws IOException,
RepositoryException,
MalformedQueryException,
UnauthorizedException
IOException
RepositoryException
MalformedQueryException
UnauthorizedException
public void sendGraphQuery(QueryLanguage ql,
String query,
Dataset dataset,
boolean includeInferred,
RDFHandler handler,
Binding... bindings)
throws IOException,
RDFHandlerException,
RepositoryException,
MalformedQueryException,
UnauthorizedException
IOException
RDFHandlerException
RepositoryException
MalformedQueryException
UnauthorizedException
public boolean sendBooleanQuery(QueryLanguage ql,
String query,
Dataset dataset,
boolean includeInferred,
Binding... bindings)
throws IOException,
RepositoryException,
MalformedQueryException,
UnauthorizedException
IOException
RepositoryException
MalformedQueryException
UnauthorizedException
protected org.apache.commons.httpclient.HttpMethod getQueryMethod(QueryLanguage ql,
String query,
Dataset dataset,
boolean includeInferred,
Binding... bindings)
protected List<org.apache.commons.httpclient.NameValuePair> getQueryMethodParameters(QueryLanguage ql,
String query,
Dataset dataset,
boolean includeInferred,
Binding... bindings)
public void getStatements(Resource subj,
URI pred,
Value obj,
boolean includeInferred,
RDFHandler handler,
Resource... contexts)
throws IOException,
RDFHandlerException,
RepositoryException,
UnauthorizedException
IOException
RDFHandlerException
RepositoryException
UnauthorizedException
public void sendTransaction(Iterable<? extends TransactionOperation> txn)
throws IOException,
RepositoryException,
UnauthorizedException
IOException
RepositoryException
UnauthorizedException
public void upload(Reader contents,
String baseURI,
RDFFormat dataFormat,
boolean overwrite,
Resource... contexts)
throws IOException,
RDFParseException,
RepositoryException,
UnauthorizedException
IOException
RDFParseException
RepositoryException
UnauthorizedException
public void upload(InputStream contents,
String baseURI,
RDFFormat dataFormat,
boolean overwrite,
Resource... contexts)
throws IOException,
RDFParseException,
RepositoryException,
UnauthorizedException
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
IOException
RDFParseException
RepositoryException
UnauthorizedException
public TupleQueryResult getContextIDs()
throws IOException,
RepositoryException,
UnauthorizedException
IOException
RepositoryException
UnauthorizedException
public void getContextIDs(TupleQueryResultHandler handler)
throws IOException,
TupleQueryResultHandlerException,
RepositoryException,
UnauthorizedException
IOException
TupleQueryResultHandlerException
RepositoryException
UnauthorizedException
public TupleQueryResult getNamespaces()
throws IOException,
RepositoryException,
UnauthorizedException
IOException
RepositoryException
UnauthorizedException
public void getNamespaces(TupleQueryResultHandler handler)
throws IOException,
TupleQueryResultHandlerException,
RepositoryException,
UnauthorizedException
IOException
TupleQueryResultHandlerException
RepositoryException
UnauthorizedException
public String getNamespace(String prefix)
throws IOException,
RepositoryException,
UnauthorizedException
IOException
RepositoryException
UnauthorizedException
public void setNamespacePrefix(String prefix,
String name)
throws IOException,
RepositoryException,
UnauthorizedException
IOException
RepositoryException
UnauthorizedException
public void removeNamespacePrefix(String prefix)
throws IOException,
RepositoryException,
UnauthorizedException
IOException
RepositoryException
UnauthorizedException
public void clearNamespaces()
throws IOException,
RepositoryException,
UnauthorizedException
IOException
RepositoryException
UnauthorizedException
public long size(Resource... contexts)
throws IOException,
RepositoryException,
UnauthorizedException
IOException
RepositoryException
UnauthorizedException
protected void getTupleQueryResult(org.apache.commons.httpclient.HttpMethod method,
TupleQueryResultHandler handler)
throws IOException,
TupleQueryResultHandlerException,
RepositoryException,
MalformedQueryException,
UnauthorizedException
IOException
TupleQueryResultHandlerException
RepositoryException
MalformedQueryException
UnauthorizedException
protected void getRDF(org.apache.commons.httpclient.HttpMethod method,
RDFHandler handler,
boolean requireContext)
throws IOException,
RDFHandlerException,
RepositoryException,
MalformedQueryException,
UnauthorizedException
IOException
RDFHandlerException
RepositoryException
MalformedQueryException
UnauthorizedException
protected boolean getBoolean(org.apache.commons.httpclient.HttpMethod method)
throws IOException,
RepositoryException,
MalformedQueryException,
UnauthorizedException
IOException
RepositoryException
MalformedQueryException
UnauthorizedException
protected String getResponseMIMEType(org.apache.commons.httpclient.HttpMethod method)
throws IOException
method - The method to get the reponse MIME type from.
IOException
protected ErrorInfo getErrorInfo(org.apache.commons.httpclient.HttpMethod method)
throws RepositoryException
RepositoryExceptionprotected final void setDoAuthentication(org.apache.commons.httpclient.HttpMethod method)
protected final void releaseConnection(org.apache.commons.httpclient.HttpMethod method)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||