deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.ogcwebservices.wfs
Class FeatureDisambiguator

java.lang.Object
  extended by org.deegree.ogcwebservices.wfs.FeatureDisambiguator

 class FeatureDisambiguator
extends java.lang.Object

Responsible for the normalization of feature collections that are going to be persisted (i.e. inserted into a Datastore). This is necessary, because it is up to WFS clients whether feature ids (gml:id attribute) are provided in an insert/update request or not.

After processing, the resulting feature collection meets the following requirements:

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Constructor Summary
FeatureDisambiguator(FeatureCollection fc)
          Creates a new FeatureDisambiguator to disambiguate the given feature collection.
 
Method Summary
(package private)  boolean checkForAnonymousFeatures()
          Checks if any anonymous features (without id) are present in the feature collection.
(package private)  FeatureCollection mergeFeatures()
          Merges all "equal" feature (and subfeature) instances in the associated feature collection that do not have a feature id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureDisambiguator

FeatureDisambiguator(FeatureCollection fc)
Creates a new FeatureDisambiguator to disambiguate the given feature collection.

Parameters:
fc - feature collection to disambiguate
Method Detail

checkForAnonymousFeatures

boolean checkForAnonymousFeatures()
Checks if any anonymous features (without id) are present in the feature collection.

Returns:
true, if one or more anonymous features are present, false otherwise

mergeFeatures

FeatureCollection mergeFeatures()
                          throws DatastoreException
Merges all "equal" feature (and subfeature) instances in the associated feature collection that do not have a feature id. Afterwards, every feature (and subfeature) in the collection has a unique feature id.

It is considered an error if there is more than root feature with the same id after the identification of equal features.

Furthermore, there is always only one feature instance with a certain id, i.e. "equal" features are represented by the same feature instance.

Returns:
"merged" feature collection
Throws:
DatastoreException

deegree 2.5 (2011/06/29 09:44 build-8-official)

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