deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.io.datastore.idgenerator
Class FeatureIdAssigner

java.lang.Object
  extended by org.deegree.io.datastore.idgenerator.FeatureIdAssigner

public class FeatureIdAssigner
extends Object

Responsible for the assigning of valid FeatureIds which are a prerequisite to the insertion of features in a Datastore. For each Insert operation, a new FeatureIdAssigner instance is created.

The behaviour of assignFID(Feature, DatastoreTransaction)} depends on the Insert.ID_GEN mode in use:

GenerateNew Prior to the assigning of new feature ids, "equal" features are looked up in the datastore and their feature ids are used.
UseExisting
  1. For every root feature, it is checked that a feature id is present and that no feature with the same id already exists in the datastore.
  2. "Equal" subfeatures are looked up in the datastore and their feature ids are used instead of the given fids -- if however an "equal" root feature is identified, an exception is thrown.
ReplaceDuplicate not supported yet

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

Field Summary
static String EXISTS_MARKER
          if an assigned feature id starts with this, it is already stored
 
Constructor Summary
FeatureIdAssigner(Insert.ID_GEN idGenMode)
          Creates a new FeatureIdAssigner instance that generates new feature ids as specified.
 
Method Summary
 void assignFID(Feature feature, DatastoreTransaction ta)
          Assigns valid FeatureIds to the given feature instance and it's subfeatures.
 void markStoredFeatures()
          TODO mark stored features a better way
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXISTS_MARKER

public static final String EXISTS_MARKER
if an assigned feature id starts with this, it is already stored

See Also:
Constant Field Values
Constructor Detail

FeatureIdAssigner

public FeatureIdAssigner(Insert.ID_GEN idGenMode)
Creates a new FeatureIdAssigner instance that generates new feature ids as specified.

Parameters:
idGenMode -
Method Detail

assignFID

public void assignFID(Feature feature,
                      DatastoreTransaction ta)
               throws IdGenerationException
Assigns valid FeatureIds to the given feature instance and it's subfeatures.

Parameters:
feature -
ta -
Throws:
IdGenerationException

markStoredFeatures

public void markStoredFeatures()
TODO mark stored features a better way


deegree 2.3 (2010/04/09 10:10 build-4-official)

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