| java.lang.Object org.openrdf.http.client.HTTPClient
HTTPClient | public class HTTPClient (Code) | | Low-level HTTP client for Sesame's HTTP protocol. Methods correspond directly
to the functionality offered by the protocol.
author: Herko ter Horst author: Arjohn Kampman |
Field Summary | |
final Logger | logger |
Method Summary | |
protected void | checkRepositoryURL() | protected void | checkServerURL() | public void | clearNamespaces() | protected boolean | getBoolean(HttpMethod method) | public TupleQueryResult | getContextIDs() | public void | getContextIDs(TupleQueryResultHandler handler) | protected ErrorInfo | getErrorInfo(HttpMethod method) | final protected HttpClient | getHttpClient() | public String | getNamespace(String prefix) | public TupleQueryResult | getNamespaces() | public void | getNamespaces(TupleQueryResultHandler handler) | public BooleanQueryResultFormat | getPreferredBooleanQueryResultFormat() Gets the preferred
BooleanQueryResultFormat for encoding boolean
query results. | public RDFFormat | getPreferredRDFFormat() Gets the preferred
RDFFormat for encoding RDF documents. | public TupleQueryResultFormat | getPreferredTupleQueryResultFormat() Gets the preferred
TupleQueryResultFormat for encoding tuple query
results. | protected HttpMethod | getQueryMethod(QueryLanguage ql, String query, Dataset dataset, boolean includeInferred, Binding... bindings) | protected List<NameValuePair> | getQueryMethodParameters(QueryLanguage ql, String query, Dataset dataset, boolean includeInferred, Binding... bindings) | protected void | getRDF(HttpMethod method, RDFHandler handler, boolean requireContext) | public TupleQueryResult | getRepositoryList() | public void | getRepositoryList(TupleQueryResultHandler handler) | public String | getRepositoryURL() | protected String | getResponseMIMEType(HttpMethod method) Gets the MIME type specified in the response headers of the supplied
method, if any. | public String | getServerProtocol() | public String | getServerURL() | public void | getStatements(Resource subj, URI pred, Value obj, boolean includeInferred, RDFHandler handler, Resource... contexts) | protected void | getTupleQueryResult(HttpMethod method, TupleQueryResultHandler handler) | public ValueFactory | getValueFactory() | final protected void | releaseConnection(HttpMethod method) | public void | removeNamespacePrefix(String prefix) | public boolean | sendBooleanQuery(QueryLanguage ql, String query, Dataset dataset, boolean includeInferred, Binding... bindings) | public GraphQueryResult | sendGraphQuery(QueryLanguage ql, String query, Dataset dataset, boolean includeInferred, Binding... bindings) | public void | sendGraphQuery(QueryLanguage ql, String query, Dataset dataset, boolean includeInferred, RDFHandler handler, Binding... bindings) | public void | sendTransaction(Iterable<? extends TransactionOperation> txn) | public TupleQueryResult | sendTupleQuery(QueryLanguage ql, String query, Dataset dataset, boolean includeInferred, Binding... bindings) | public void | sendTupleQuery(QueryLanguage ql, String query, Dataset dataset, boolean includeInferred, TupleQueryResultHandler handler, Binding... bindings) | final protected void | setDoAuthentication(HttpMethod method) | public void | setNamespacePrefix(String prefix, String name) | public void | setPreferredBooleanQueryResultFormat(BooleanQueryResultFormat format) Sets the preferred format for encoding boolean query results. | public void | setPreferredRDFFormat(RDFFormat format) Sets the preferred format for encoding RDF documents. | public void | setPreferredTupleQueryResultFormat(TupleQueryResultFormat format) Sets the preferred format for encoding tuple query results. | public void | setRepositoryID(String repositoryID) | public void | setRepositoryURL(String repositoryURL) | public void | setServerURL(String serverURL) | public void | setUsernameAndPassword(String username, String password) Set the username and password for authenication with the remote server. | public void | setValueFactory(ValueFactory valueFactory) | public long | size(Resource... contexts) | public void | upload(Reader contents, String baseURI, RDFFormat dataFormat, boolean overwrite, Resource... contexts) | public void | upload(InputStream contents, String baseURI, RDFFormat dataFormat, boolean overwrite, Resource... contexts) | protected void | upload(RequestEntity reqEntity, String baseURI, boolean overwrite, Resource... contexts) |
logger | final Logger logger(Code) | | |
HTTPClient | public HTTPClient()(Code) | | |
checkRepositoryURL | protected void checkRepositoryURL()(Code) | | |
checkServerURL | protected void checkServerURL()(Code) | | |
getHttpClient | final protected HttpClient getHttpClient()(Code) | | |
getPreferredRDFFormat | public RDFFormat getPreferredRDFFormat()(Code) | | Gets the preferred
RDFFormat for encoding RDF documents.
The preferred format, of null if no specific format ispreferred. |
getResponseMIMEType | protected String getResponseMIMEType(HttpMethod method) throws IOException(Code) | | Gets the MIME type specified in the response headers of the supplied
method, if any. For example, if the response headers contain
Content-Type: application/xml;charset=UTF-8, this method will
return application/xml as the MIME type.
Parameters: method - The method to get the reponse MIME type from. The response MIME type, or null if not available. |
releaseConnection | final protected void releaseConnection(HttpMethod method)(Code) | | |
setDoAuthentication | final protected void setDoAuthentication(HttpMethod method)(Code) | | |
setPreferredRDFFormat | public void setPreferredRDFFormat(RDFFormat format)(Code) | | Sets the preferred format for encoding RDF documents. The
RDFFormat.TURTLE Turtle format is preferred by default.
Parameters: format - The preferred RDFFormat, or null to indicate nospecific format is preferred. |
setRepositoryID | public void setRepositoryID(String repositoryID)(Code) | | |
setRepositoryURL | public void setRepositoryURL(String repositoryURL)(Code) | | |
setServerURL | public void setServerURL(String serverURL)(Code) | | |
setUsernameAndPassword | public void setUsernameAndPassword(String username, String password)(Code) | | Set the username and password for authenication with the remote server.
Parameters: username - the username Parameters: password - the password |
|
|