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 WFSConfigconfigprotected WFSOperationTypeoperationprotected WFSStrategystrategy-
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 WFSResponsecreateResponse(HTTPResponse response)Each Request must know how to create it's counterpart Response.URLgetFinalURL()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.StringgetHandle()WFSOperationTypegetOperation()StringgetOutputFormat()StringgetPostContentType()Default POST content type is xmlWFSStrategygetStrategy()QNamegetTypeName()protected voidinitRequest()protected voidinitService()Implementing subclass requests must specify their own "SERVICE" value.protected voidinitVersion()Sets up the version number for this request.voidperformPostOutput(OutputStream outputStream)Default to not requiring POST.booleanrequiresPost()Default to not requiring POST.voidsetHandle(String handle)voidsetOutputFormat(String outputFormat)voidsetTypeName(QName typeName)StringtoString()-
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:AbstractRequestDefault to not requiring POST. Implementors can override if they need to.- Specified by:
requiresPostin interfaceRequest- Overrides:
requiresPostin classAbstractRequest- Returns:
- true if this request needs POST support, false otherwise.
-
initService
protected void initService()
Description copied from class:AbstractRequestImplementing subclass requests must specify their own "SERVICE" value. Example: setProperty("SERVICE", "WFS");- Specified by:
initServicein classAbstractRequest
-
initVersion
protected void initVersion()
Description copied from class:AbstractRequestSets up the version number for this request. Typically something like setProperty("VERSION", "1.1.1");- Specified by:
initVersionin classAbstractRequest
-
initRequest
protected void initRequest()
- Specified by:
initRequestin classAbstractRequest
-
getFinalURL
public URL getFinalURL()
Description copied from interface:RequestOnce 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:
getFinalURLin interfaceRequest- Overrides:
getFinalURLin 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:AbstractRequestDefault POST content type is xml- Specified by:
getPostContentTypein interfaceRequest- Overrides:
getPostContentTypein 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:AbstractRequestDefault to not requiring POST. Implementors can override if they need to.- Specified by:
performPostOutputin interfaceRequest- Overrides:
performPostOutputin classAbstractRequest- Throws:
IOException
-
createResponse
public WFSResponse createResponse(HTTPResponse response) throws ServiceException, IOException
Description copied from interface:RequestEach 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:
createResponsein interfaceRequest- Throws:
ServiceExceptionIOException
-
-