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.model.feature
Class FeatureTupleCollection

    java.lang.Object
      org.deegree.model.feature.AbstractFeature
          org.deegree.model.feature.AbstractFeatureCollection
              org.deegree.model.feature.FeatureTupleCollection

All Implemented Interfaces:
  Serializable, Feature, FeatureCollection

    public class FeatureTupleCollection

extends AbstractFeatureCollection
implements Serializable

Represents a `FeatureCollection` that only contains `wfs:featureTuple` elements (as introduced by the draft WFS 1.2 spec).

NOTE: Some concepts of ordinary feature collections (like adding and removing of features) do not match well to this special kind of feature collection, mostly because it uses a `FeatureArrayPropertyType` for the `wfs:featureTuple` element. Thus, many methods inherited from `AbstractFeatureCollection` have no clear semantic and are not available. !!!Please note that most methods are not implemented yet!!!

Version:
  $Revision: 6840 $ $Date: 2007-05-07 10:27:43 +0200 (Mo, 07 Mai 2007) $
Author:
  Markus Schneider
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.deegree.model.feature.AbstractFeature
`description, envelopeCalculated, featureType, owner`

Constructor Summary
`FeatureTupleCollection(String id, List<Feature[]> tuples, int tupleLength)`

Method Summary
`void` | `add(Feature feature)` adds a feature to the collection
`void` | `addProperty(FeatureProperty property)` Adds the given property to the feature's properties.
`void` | `clear()` removes all features from a collection
`Feature` | `cloneDeep()`
`Envelope` | `getBoundedBy()` Returns the envelope / boundingbox of the feature.
`FeatureProperty` | `getDefaultProperty(PropertyPath path)` Returns the property of the feature identified by the given `PropertyPath`.
`Feature` | `getFeature(int index)`
`Feature` | `getFeature(String id)`
`Feature[]` | `getTuple(int index)` Returns the feature tuple at the given index.
`Iterator<Feature>` | `iterator()` returns an `Iterator` on the feature contained in a collection
`int` | `numTuples()` Returns the number of feature tuples contained in this collection.
`Feature` | `remove(Feature feature)` removes the submitted feature from the collection
`Feature` | `remove(int index)` removes the feature at the submitted index from the collection
`void` | `removeProperty(QualifiedName propertyName)` Removes the properties with the given name.
`void` | `replaceProperty(FeatureProperty oldProperty, FeatureProperty newProperty)` Replaces the given property with a new one.
`void` | `setProperty(FeatureProperty property, int index)` Sets the value for the given property.
`int` | `size()`
`Feature[]` | `toArray()`
`int` | `tupleLength()` Returns the length (number of features) of each tuple.

Methods inherited from class org.deegree.model.feature.AbstractFeatureCollection
`addAll, addAll, addAllUncontained, addAllUncontained, getDefaultGeometryPropertyValue, getDefaultProperty, getGeometryPropertyValues, getProperties, getProperties, getProperties, remove, setProperty`

Methods inherited from class org.deegree.model.feature.AbstractFeature
`clone, getAttribute, getAttributes, getDescription, getFeatureType, getId, getName, getOwner, resetBounds, setAttribute, setEnvelopesUpdated, setFeatureType, setId`

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

Methods inherited from interface org.deegree.model.feature.Feature
`clone, getAttribute, getAttributes, getDescription, getFeatureType, getId, getName, getOwner, setAttribute, setEnvelopesUpdated, setFeatureType, setId`

Constructor Detail

### FeatureTupleCollection

    FeatureTupleCollection(String id,
                           List<Feature[]> tuples,
                           int tupleLength)

Method Detail

### clear

    public void clear()

  Description copied from interface: `FeatureCollection`
  removes all features from a collection

  Specified by:
    `clear` in interface `FeatureCollection`

### getTuple

    public Feature[] getTuple(int index)

  Returns the feature tuple at the given index.

  Parameters:
    `index` -
  Returns:
    the feature tuple at the given index

### numTuples

    public int numTuples()

  Returns the number of feature tuples contained in this collection.

  Returns:
    the number of feature tuples contained in this collection

### tupleLength

    public int tupleLength()

  Returns the length (number of features) of each tuple.

  Returns:
    the length (number of features) of each tuple.

### getBoundedBy

    public Envelope getBoundedBy()
                          throws GeometryException

  Description copied from class: `AbstractFeature`
  Returns the envelope / boundingbox of the feature. The bounding box will be created in a recursion. That means if a property of the feature (a) contains another feature (b) the bounding box of b will be merged with the bounding box calculated from the geometry properties of a. A feature has no geometry properties and no properties that are features (and having a bounding box theirself) `null` will be returned.

  Specified by:
    `getBoundedBy` in interface `Feature`
  Overrides:
    `getBoundedBy` in class `AbstractFeature`
  Returns:
    the envelope / bounding box of the feature
  Throws:
    `GeometryException`

### size

    public int size()

  Specified by:
    `size` in interface `FeatureCollection`
  Returns:
    the number of features within the collection

### add

    public void add(Feature feature)

  Description copied from interface: `FeatureCollection`
  adds a feature to the collection

  Specified by:
    `add` in interface `FeatureCollection`
  Parameters:
    `feature` - to add.

### getFeature

    public Feature getFeature(int index)

  Specified by:
    `getFeature` in interface `FeatureCollection`
  Parameters:
    `index` - of the feature.
  Returns:
    the feature at the submitted index

### getFeature

    public Feature getFeature(String id)

  Specified by:
    `getFeature` in interface `FeatureCollection`
  Parameters:
    `id` - of the feature
  Returns:
    the feature that is assigned to the submitted id. If no valid feature could be found `null` will be returned.

### iterator

    public Iterator<Feature> iterator()

  Description copied from interface: `FeatureCollection`
  returns an `Iterator` on the feature contained in a collection

  Specified by:
    `iterator` in interface `FeatureCollection`
  Returns:
    an `Iterator` on the feature contained in a collection

### remove

    public Feature remove(Feature feature)

  Description copied from interface: `FeatureCollection`
  removes the submitted feature from the collection

  Specified by:
    `remove` in interface `FeatureCollection`
  Parameters:
    `feature` - to remove
  Returns:
    removed feature

### remove

    public Feature remove(int index)

  Description copied from interface: `FeatureCollection`
  removes the feature at the submitted index from the collection

  Specified by:
    `remove` in interface `FeatureCollection`
  Parameters:
    `index` - of the feature to remove.
  Returns:
    removed feature

### toArray

    public Feature[] toArray()

  Specified by:
    `toArray` in interface `FeatureCollection`
  Returns:
    an array of all features

### addProperty

    public void addProperty(FeatureProperty property)

  Description copied from interface: `Feature`
  Adds the given property to the feature's properties. The position of the property is determined by the feature type. If the feature already has a property with this name, it is inserted behind it.

  Specified by:
    `addProperty` in interface `Feature`
  Parameters:
    `property` - property to insert

### getDefaultProperty

    public FeatureProperty getDefaultProperty(PropertyPath path)
                                       throws PropertyPathResolvingException

  Description copied from interface: `Feature`
  Returns the property of the feature identified by the given `PropertyPath`. NOTE: Current implementation does not handle multiple properties (on the path) or index addressing in the path.

  Specified by:
    `getDefaultProperty` in interface `Feature`
  Parameters:
    `path` - the path of the property to look up
  Returns:
    the property of the feature identified by the given PropertyPath
  Throws:
    `PropertyPathResolvingException`
  See Also:
    `PropertyPath`

### removeProperty

    public void removeProperty(QualifiedName propertyName)

  Description copied from interface: `Feature`
  Removes the properties with the given name.

  Specified by:
    `removeProperty` in interface `Feature`
  Parameters:
    `propertyName` - name of the properties to remove

### replaceProperty

    public void replaceProperty(FeatureProperty oldProperty,
                                FeatureProperty newProperty)

  Description copied from interface: `Feature`
  Replaces the given property with a new one.

  Specified by:
    `replaceProperty` in interface `Feature`
  Parameters:
    `oldProperty` - property to be replaced
    `newProperty` - new property

### setProperty

    public void setProperty(FeatureProperty property,
                            int index)

  Description copied from interface: `Feature`
  Sets the value for the given property. The index is needed to specify the occurences of the property that is to be replaced. Set to 0 for properties that may only occur once.

  Specified by:
    `setProperty` in interface `Feature`
  Parameters:
    `property` - property name and the property's new value
    `index` - position of the property that is to be replaced

### cloneDeep

    public Feature cloneDeep()
                      throws CloneNotSupportedException

  Specified by:
    `cloneDeep` in interface `Feature`
  Returns:
    a deep clone of a feature. All not simple properties (incl. geometries) will be cloned
  Throws:
    `CloneNotSupportedException`

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