Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.ogcwebservices.wfs.operation
Class GetFeature

    java.lang.Object
      org.deegree.ogcwebservices.AbstractOGCWebServiceRequest
          org.deegree.ogcwebservices.wfs.operation.AbstractWFSRequest
              org.deegree.ogcwebservices.wfs.operation.GetFeature

All Implemented Interfaces:
  Serializable, OGCWebServiceRequest

Direct Known Subclasses:
  AugmentableGetFeature, GetFeatureWithLock

    public class GetFeature

extends AbstractWFSRequest

Represents a `GetFeature` request to a web feature service.

The GetFeature operation allows the retrieval of features from a web feature service. A GetFeature request is processed by a WFS and when the value of the outputFormat attribute is set to text/gml; subtype=gml/3.1.1, a GML instance document, containing the result set, is returned to the client.

Version:
  $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
  Andreas Poth , Markus Schneider, last edited by: $Author: mschneider $
See Also:
  Serialized Form

Nested Class Summary
`static class` | `GetFeature.RESULT_TYPE` Known result types.

Field Summary
`static String` | `FORMAT_FEATURECOLLECTION` Serialized java object format (deegree specific extension) *
`protected int` | `maxFeatures`
`protected String` | `outputFormat`
`protected List<Query>` | `queries`
`protected GetFeature.RESULT_TYPE` | `resultType`
`protected int` | `startPosition`

Fields inherited from class org.deegree.ogcwebservices.wfs.operation.AbstractWFSRequest
`FORMAT_GML2, FORMAT_GML2_WFS100, FORMAT_GML3, FORMAT_XML`

Constructor Summary
`protected` | `GetFeature()` Creates an uninitialized `GetFeature` instance.
`(package private)` | `GetFeature(String version, String id, String handle, GetFeature.RESULT_TYPE resultType, String outputFormat, int maxFeatures, int startPosition, int traverseXLinkDepth, int traverseXLinkExpiry, Query[] queries, Map<String,String> vendorSpecificParam)` Creates a new `GetFeature` instance.

Method Summary
`static GetFeature` | `create(Map<String,String> kvp)` Creates a new `GetFeature` request from the given map.
`static GetFeature` | `create(String id, Element root)` Creates a new `GetFeature` instance from a document that contains the DOM representation of the request.
`static GetFeature` | `create(String id, String request)` Creates a new `GetFeature` instance from the given key-value pair encoded request.
`static GetFeature` | `create(String version, String id, GetFeature.RESULT_TYPE resultType, String outputFormat, String handle, int maxFeatures, int startPosition, int traverseXLinkDepth, int traverseXLinkExpiry, Query[] queries)` Creates a new `GetFeature` instance from the given parameters.
`protected static Map<QualifiedName,PropertyPath[]>` | `extractPropNames(Map<String,String> kvp, QualifiedName[] typeNames)` Extracts the PROPERTYNAME parameter and assigns them to the requested type names.
`int` | `getMaxFeatures()` The optional maxFeatures attribute can be used to limit the number of features that a GetFeature request retrieves.
`String` | `getOutputFormat()` Returns the output format.
`Query[]` | `getQuery()` The query defines which feature type to query, what properties to retrieve and what constraints (spatial and non-spatial) to apply to those properties.
`GetFeature.RESULT_TYPE` | `getResultType()` Returns the desired result type of the GetFeature operation.
`int` | `getStartPosition()` The startPosition parameter identifies the first result set entry to be returned specified the default is the first record.
`int` | `getTraverseXLinkDepth()` The optional traverseXLinkDepth attribute indicates the depth to which nested property XLink linking element locator attribute (href) XLinks in all properties of the selected feature(s) are traversed and resolved if possible.
`int` | `getTraverseXLinkExpiry()` The traverseXLinkExpiry attribute is specified in minutes.
`void` | `guessAllMissingNamespaces(WFService wfs)` Adds missing namespaces to requested feature type names, property names, filter properties and sort properties.
`void` | `guessMissingTypeNameNamespaces(WFService wfs)` Adds missing namespaces in the names of requested feature types.
`void` | `setMaxFeatures(int max)`
`void` | `setQueries(Query[] query)` sets the
`String` | `toString()`

Methods inherited from class org.deegree.ogcwebservices.wfs.operation.AbstractWFSRequest
`checkServiceParameter, checkVersionParameter, extractBBOXFilter, extractFilters, extractNamespaceParameter, extractTypeNames, getHandle, getServiceName`

Methods inherited from class org.deegree.ogcwebservices.AbstractOGCWebServiceRequest
`getId, getParam, getParamAsInt, getParamValues, getRequestParameter, getRequiredParam, getVendorSpecificParameter, getVendorSpecificParameters, getVersion`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### FORMAT_FEATURECOLLECTION

    public static final String FORMAT_FEATURECOLLECTION

  Serialized java object format (deegree specific extension) *

  See Also:
    Constant Field Values

### resultType

    protected GetFeature.RESULT_TYPE resultType

### outputFormat

    protected String outputFormat

### maxFeatures

    protected int maxFeatures

### queries

    protected List<Query> queries

### startPosition

    protected int startPosition

Constructor Detail

### GetFeature

    GetFeature(String version,
               String id,
               String handle,
               GetFeature.RESULT_TYPE resultType,
               String outputFormat,
               int maxFeatures,
               int startPosition,
               int traverseXLinkDepth,
               int traverseXLinkExpiry,
               Query[] queries,
               Map<String,String> vendorSpecificParam)

  Creates a new `GetFeature` instance.

  Parameters:
    `version` - request version
    `id` - id of the request
    `handle` -
    `resultType` - desired result type (results | hits)
    `outputFormat` - requested result format
    `maxFeatures` -
    `startPosition` - deegree specific parameter defining where to start considering features
    `traverseXLinkDepth` - indicates the depth to which nested property XLink linking element locator attribute (href) XLinks are traversed and resolved if possible (not implemented yet, use -1 as default)
    `traverseXLinkExpiry` - indicates how long a Web Feature Service should wait to receive a response to a nested GetGmlObject request (not implemented yet, use 0 as default)
    `queries` -
    `vendorSpecificParam` -

### GetFeature

    protected GetFeature()

  Creates an uninitialized `GetFeature` instance.

Method Detail

### create

    public static GetFeature create(String version,
                                    String id,
                                    GetFeature.RESULT_TYPE resultType,
                                    String outputFormat,
                                    String handle,
                                    int maxFeatures,
                                    int startPosition,
                                    int traverseXLinkDepth,
                                    int traverseXLinkExpiry,
                                    Query[] queries)

  Creates a new `GetFeature` instance from the given parameters.

  Parameters:
    `version` - request version
    `id` - id of the request
    `resultType` - desired result type (results | hits)
    `outputFormat` - requested result format
    `handle` -
    `maxFeatures` - default = -1 (all features)
    `startPosition` - default = 0 (starting at the first feature)
    `traverseXLinkDepth` -
    `traverseXLinkExpiry` -
    `queries` - a set of Query objects that describes the query to perform
  Returns:
    new `GetFeature` request

### create

    public static GetFeature create(String id,
                                    Element root)
                             throws OGCWebServiceException

  Creates a new `GetFeature` instance from a document that contains the DOM representation of the request.

  Parameters:
    `id` - of the request
    `root` - element that contains the DOM representation of the request
  Returns:
    new `GetFeature` request
  Throws:
    `OGCWebServiceException`

### create

    public static GetFeature create(String id,
                                    String request)
                             throws InconsistentRequestException,
                                    InvalidParameterValueException,
                                    MissingParameterValueException

  Creates a new `GetFeature` instance from the given key-value pair encoded request.

  Parameters:
    `id` - request identifier
    `request` -
  Returns:
    new `GetFeature` request
  Throws:
    `InvalidParameterValueException`
    `InconsistentRequestException`
    `MissingParameterValueException`

### create

    public static GetFeature create(Map<String,String> kvp)
                             throws InconsistentRequestException,
                                    InvalidParameterValueException,
                                    MissingParameterValueException

  Creates a new `GetFeature` request from the given map.

  Parameters:
    `kvp` - key-value pairs, keys have to be uppercase
  Returns:
    new `GetFeature` request
  Throws:
    `InvalidParameterValueException`
    `InconsistentRequestException`
    `MissingParameterValueException`

### extractPropNames

    protected static Map<QualifiedName,PropertyPath[]> extractPropNames(Map<String,String> kvp,
                                                                        QualifiedName[] typeNames)
                                                                 throws InvalidParameterValueException

  Extracts the PROPERTYNAME parameter and assigns them to the requested type names.

  Parameters:
    `kvp` -
    `typeNames` -
  Returns:
    map with the assignments of type names to property names
  Throws:
    `InvalidParameterValueException`

### getOutputFormat

    public String getOutputFormat()

  Returns the output format.

  The outputFormat attribute defines the format to use to generate the result set. Vendor specific formats, declared in the capabilities document are possible. The WFS-specs implies GML as default output format.

  Returns:
    the output format.

### getQuery

    public Query[] getQuery()

  The query defines which feature type to query, what properties to retrieve and what constraints (spatial and non-spatial) to apply to those properties.

  only used for xml-coded requests

  Returns:
    contained queries

### setQueries

    public void setQueries(Query[] query)

  sets the

  Parameters:
    `query` -

### getMaxFeatures

    public int getMaxFeatures()

  The optional maxFeatures attribute can be used to limit the number of features that a GetFeature request retrieves. Once the maxFeatures limit is reached, the result set is truncated at that point. If not limit is set -1 will be returned.

  Returns:
    number of feature to fetch, -1 if no limit is set

### setMaxFeatures

    public void setMaxFeatures(int max)

  Parameters:
    `max` -
  See Also:
    `getMaxFeatures()`

### getStartPosition

    public int getStartPosition()

  The startPosition parameter identifies the first result set entry to be returned specified the default is the first record. If not startposition is set 0 will be returned

  Returns:
    the first result set entry to be returned

### getResultType

    public GetFeature.RESULT_TYPE getResultType()

  Returns the desired result type of the GetFeature operation. Possible values are 'results' and 'hits'.

  Returns:
    the desired result type

### getTraverseXLinkDepth

    public int getTraverseXLinkDepth()

  The optional traverseXLinkDepth attribute indicates the depth to which nested property XLink linking element locator attribute (href) XLinks in all properties of the selected feature(s) are traversed and resolved if possible. A value of "1" indicates that one linking element locator attribute (href) XLink will be traversed and the referenced element returned if possible, but nested property XLink linking element locator attribute (href) XLinks in the returned element are not traversed. A value of "*" indicates that all nested property XLink linking element locator attribute (href) XLinks will be traversed and the referenced elements returned if possible. The range of valid values for this attribute consists of positive integers plus "*".

  Returns:
    the depth to which nested property XLinks are traversed and resolved

### getTraverseXLinkExpiry

    public int getTraverseXLinkExpiry()

  The traverseXLinkExpiry attribute is specified in minutes. It indicates how long a Web Feature Service should wait to receive a response to a nested GetGmlObject request. If no traverseXLinkExpiry attribute is present for a GetGmlObject request, the WFS wait time is implementation dependent.

  Returns:
    how long to wait to receive a response to a nested GetGmlObject request

### guessMissingTypeNameNamespaces

    public void guessMissingTypeNameNamespaces(WFService wfs)

  Adds missing namespaces in the names of requested feature types.

  If the `QualifiedName` of a requested type has a null namespace, the first qualified feature type name of the given `WFService` with the same local name is used instead.

  Note: The method changes this request (the feature type names) and should only be called by the `WFSHandler` class.

  Parameters:
    `wfs` - `WFService` instance that is used for the lookup of proper (qualified) feature type names

### guessAllMissingNamespaces

    public void guessAllMissingNamespaces(WFService wfs)

  Adds missing namespaces to requested feature type names, property names, filter properties and sort properties.

  Note: The method changes the request and should only be called by the `WFSHandler` class.

  Parameters:
    `wfs` - `WFService` instance that is used for the lookup of proper (qualified) feature and property names

### toString

    public String toString()

  Overrides:
    `toString` in class `AbstractOGCWebServiceRequest`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org