public abstract class UpdateProcessRemoteBase extends Object implements UpdateProcessor
Modifier and Type | Field and Description |
---|---|
static Symbol |
HTTP_CONTEXT
Symbol used to set a
HttpContext which will be used for HTTP
requests |
Constructor and Description |
---|
UpdateProcessRemoteBase(UpdateRequest request,
String endpoint,
Context context)
Creates a new remote update processor
|
Modifier and Type | Method and Description |
---|---|
void |
addDefaultGraph(String defaultGraph)
Adds a default graph
|
void |
addNamedGraph(String namedGraph)
Adds a named graph
|
void |
addParam(String field,
String value)
Adds a custom parameter to the request
|
org.apache.http.client.HttpClient |
getClient()
Gets the client that has been set (if any)
|
Context |
getContext()
The properties associated with a query execution -
implementation specific parameters This includes
Java objects (so it is not an RDF graph).
|
DatasetGraph |
getDatasetGraph()
The dataset against which the query will execute.
|
String |
getEndpoint()
Gets the endpoint
|
org.apache.http.protocol.HttpContext |
getHttpContext()
Convenience method to get the
HttpContext |
Params |
getParams()
Gets the parameters for the execution
|
String |
getQueryString()
Deprecated.
|
UpdateRequest |
getUpdateRequest()
Gets the update request
|
String |
getUpdateString()
Gets the generated HTTP query string portion of the endpoint URL if applicable
|
void |
setClient(org.apache.http.client.HttpClient client)
Sets the client to use
|
void |
setDefaultGraphs(List<String> defaultGraphs)
Sets the default graphs
|
void |
setHttpContext(org.apache.http.protocol.HttpContext httpContext)
Convenience method to set the
HttpContext |
void |
setNamedGraphs(List<String> namedGraphs)
Sets the named graphs
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute, getGraphStore
public static final Symbol HTTP_CONTEXT
HttpContext
which will be used for HTTP
requestspublic UpdateProcessRemoteBase(UpdateRequest request, String endpoint, Context context)
request
- Update requestendpoint
- Update endpointcontext
- Contextpublic DatasetGraph getDatasetGraph()
UpdateProcessor
getDatasetGraph
in interface UpdateProcessor
public String getEndpoint()
@Deprecated public String getQueryString()
getUpdateString()
public String getUpdateString()
Generated string will not include leading ? so that consuming code can decide whether to add this themselves since the generated query string may be being used in addition to an existing query string.
public Params getParams()
public UpdateRequest getUpdateRequest()
public void addDefaultGraph(String defaultGraph)
defaultGraph
- Default Graph URIpublic void addNamedGraph(String namedGraph)
namedGraph
- Named Graph URipublic void addParam(String field, String value)
field
- Fieldvalue
- Valuepublic void setDefaultGraphs(List<String> defaultGraphs)
defaultGraphs
- Default Graphspublic void setNamedGraphs(List<String> namedGraphs)
namedGraphs
- Named Graphspublic void setHttpContext(org.apache.http.protocol.HttpContext httpContext)
HttpContext
httpContext
- HTTP Contextpublic org.apache.http.protocol.HttpContext getHttpContext()
HttpContext
public Context getContext()
UpdateProcessor
getContext
in interface UpdateProcessor
public void setClient(org.apache.http.client.HttpClient client)
Note that you can globally set an client via
HttpOp.setDefaultHttpClient(HttpClient)
to avoid the
need to set client on a per-request basis
client
- HTTP clientpublic org.apache.http.client.HttpClient getClient()
If no client is used then the default client will be used,
this can be configured via the
HttpOp.setDefaultHttpClient(HttpClient)
method.
Licenced under the Apache License, Version 2.0