Package org.geotools.data.wfs.internal
Class WFSRequest
- Object
-
- AbstractRequest
-
- WFSRequest
-
- All Implemented Interfaces:
Request
- Direct Known Subclasses:
DescribeFeatureTypeRequest
,DescribeStoredQueriesRequest
,GetFeatureRequest
,ListStoredQueriesRequest
,TransactionRequest
public abstract class WFSRequest extends AbstractRequest implements Request
-
-
Field Summary
Fields Modifier and Type Field Description protected WFSConfig
config
protected WFSOperationType
operation
protected WFSStrategy
strategy
-
Fields inherited from class AbstractRequest
EXCEPTION_XML, hints, onlineResource, properties
-
-
Constructor Summary
Constructors Constructor Description WFSRequest(WFSOperationType operation, WFSConfig config, WFSStrategy strategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WFSResponse
createResponse(HTTPResponse response)
Each Request must know how to create it's counterpart Response.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.String
getHandle()
WFSOperationType
getOperation()
String
getOutputFormat()
String
getPostContentType()
Default POST content type is xmlWFSStrategy
getStrategy()
QName
getTypeName()
protected void
initRequest()
protected void
initService()
Implementing subclass requests must specify their own "SERVICE" value.protected void
initVersion()
Sets up the version number for this request.void
performPostOutput(OutputStream outputStream)
Default to not requiring POST.boolean
requiresPost()
Default to not requiring POST.void
setHandle(String handle)
void
setOutputFormat(String outputFormat)
void
setTypeName(QName typeName)
String
toString()
-
Methods inherited from class AbstractRequest
getProperties, getRequestHints, processKey, setProperty, setRequestHints
-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface Request
getProperties, getRequestHints, setProperty, setRequestHints
-
-
-
-
Field Detail
-
strategy
protected final WFSStrategy strategy
-
operation
protected final WFSOperationType operation
-
config
protected final WFSConfig config
-
-
Constructor Detail
-
WFSRequest
public WFSRequest(WFSOperationType operation, WFSConfig config, WFSStrategy strategy)
-
-
Method Detail
-
getOutputFormat
public String getOutputFormat()
-
getHandle
public String getHandle()
-
setHandle
public void setHandle(String handle)
-
setOutputFormat
public void setOutputFormat(String outputFormat)
- Parameters:
outputFormat
- the outputFormat to set
-
setTypeName
public void setTypeName(QName typeName)
-
getTypeName
public QName getTypeName()
-
getStrategy
public WFSStrategy getStrategy()
-
getOperation
public WFSOperationType getOperation()
-
requiresPost
public boolean requiresPost()
Description copied from class:AbstractRequest
Default to not requiring POST. Implementors can override if they need to.- Specified by:
requiresPost
in interfaceRequest
- Overrides:
requiresPost
in classAbstractRequest
- Returns:
- true if this request needs POST support, false otherwise.
-
initService
protected void initService()
Description copied from class:AbstractRequest
Implementing subclass requests must specify their own "SERVICE" value. Example: setProperty("SERVICE", "WFS");- Specified by:
initService
in classAbstractRequest
-
initVersion
protected void initVersion()
Description copied from class:AbstractRequest
Sets up the version number for this request. Typically something like setProperty("VERSION", "1.1.1");- Specified by:
initVersion
in classAbstractRequest
-
initRequest
protected void initRequest()
- Specified by:
initRequest
in classAbstractRequest
-
getFinalURL
public URL getFinalURL()
Description copied from interface:Request
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.- Specified by:
getFinalURL
in interfaceRequest
- Overrides:
getFinalURL
in classAbstractRequest
- Returns:
- a URL that can be used to issue the request
- See Also:
org.geotools.data.wms.request.Request#getFinalURL()
-
getPostContentType
public String getPostContentType()
Description copied from class:AbstractRequest
Default POST content type is xml- Specified by:
getPostContentType
in interfaceRequest
- Overrides:
getPostContentType
in classAbstractRequest
- Returns:
- the MIME type of the data to be sent during the request
-
performPostOutput
public void performPostOutput(OutputStream outputStream) throws IOException
Description copied from class:AbstractRequest
Default to not requiring POST. Implementors can override if they need to.- Specified by:
performPostOutput
in interfaceRequest
- Overrides:
performPostOutput
in classAbstractRequest
- Throws:
IOException
-
createResponse
public WFSResponse createResponse(HTTPResponse response) throws IOException
Description copied from interface:Request
Each Request must know how to create it's counterpart Response. Given the content type and input stream (containin the response data), this method must return an appropriate Response object.- Specified by:
createResponse
in interfaceRequest
- Throws:
IOException
-
-