|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.ows.AbstractRequest
public abstract class AbstractRequest
A class that provides functionality for performing basic requests
Field Summary | |
---|---|
static java.lang.String |
EXCEPTION_XML
Represents OGC Exception MIME types |
protected java.net.URL |
onlineResource
|
protected java.util.Properties |
properties
|
Fields inherited from interface org.geotools.data.ows.Request |
---|
REQUEST, SERVICE, VERSION, WMTVER |
Constructor Summary | |
---|---|
AbstractRequest(java.net.URL onlineResource,
java.util.Properties properties)
Creates an AbstractRequest. |
Method Summary | |
---|---|
java.net.URL |
getFinalURL()
Once the properties of the request are configured, this will return the URL that points to the server and contains all of the appropriate name/value parameters. |
java.lang.String |
getPostContentType()
Default POST content type is xml |
java.util.Properties |
getProperties()
|
protected abstract void |
initRequest()
|
protected abstract void |
initService()
Implementing subclass requests must specify their own "SERVICE" value. |
protected abstract void |
initVersion()
Sets up the version number for this request. |
void |
performPostOutput(java.io.OutputStream outputStream)
Default to not requiring POST. |
protected java.lang.String |
processKey(java.lang.String key)
Some Open Web Servers do not abide by the fact that parameter keys should be case insensitive. |
boolean |
requiresPost()
Default to not requiring POST. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets the name/value property for this request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.geotools.data.ows.Request |
---|
createResponse |
Field Detail |
---|
public static final java.lang.String EXCEPTION_XML
protected java.net.URL onlineResource
protected java.util.Properties properties
Constructor Detail |
---|
public AbstractRequest(java.net.URL onlineResource, java.util.Properties properties)
null
, it will use them instead of
creating a new Properties object.
This constructor will strip all the query parameters off of
onlineResource and put them in the properties map. This allows clients
to provide their own parameters and have them saved and used along with
the OWS specific ones.
However, certain parameters will be over-written by individual requests
themselves. Examples of such parameters include, but are not limited to:
onlineResource
- the URL to construct the Request forproperties
- a map of pre-set parameters to be used. Can be null.Method Detail |
---|
public java.net.URL getFinalURL()
Request
getFinalURL
in interface Request
org.geotools.data.wms.request.Request#getFinalURL()
protected java.lang.String processKey(java.lang.String key)
key
- the key to be processed
public void setProperty(java.lang.String name, java.lang.String value)
Request
value
according to the
OWS specifications! The code will not do this for you.
Different OWS specifications define different ways to do this. There are
notorious differences between WMS 1.1.1 (section 6.2.1) and
WMS 1.3.0 (section 6.3.2) for example.
If value is null, "name" is removed from the properties table.
setProperty
in interface Request
name
- the name of the propertyvalue
- the value of the propertypublic java.util.Properties getProperties()
getProperties
in interface Request
protected abstract void initRequest()
protected abstract void initService()
protected abstract void initVersion()
public java.lang.String getPostContentType()
getPostContentType
in interface Request
public void performPostOutput(java.io.OutputStream outputStream) throws java.io.IOException
performPostOutput
in interface Request
java.io.IOException
public boolean requiresPost()
requiresPost
in interface Request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |