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

org.deegree.io.datastore.schema
Class MappedGMLId

java.lang.Object
  extended by org.deegree.io.datastore.schema.MappedGMLId

public class MappedGMLId
extends Object

Defines how values for "gml:id" attributes for a certain feature type are generated and which columns are used to store it.

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

Nested Class Summary
static class MappedGMLId.IDPART_INFO
          Used to represent the 'identityPart' information.
 
Constructor Summary
MappedGMLId(String prefix, String separator, MappingField[] idFields, IdGenerator idGenerator, MappedGMLId.IDPART_INFO idPartInfo)
          Creates a new instance of MappedGMLId from the given parameters.
 
Method Summary
(package private)  FeatureId generateFid(MappedFeatureType ft, DatastoreTransaction ta)
          Generates a new and unique feature identifier.
 MappingField[] getIdFields()
          Returns the MappingFields that are used to build the "gml:id".
 IdGenerator getIdGenerator()
          TODO remove this.
 MappedGMLId.IDPART_INFO getIdPartInfo()
          Returns whether the configuration explicitly defines that the id has to be considered when two features are checked for equality.
 int getKeySize()
          Returns the number of MappingFields that constitute the "gml:id".
 String getPrefix()
          Returns the prefix.
 String getSeparator()
          Returns the separator.
 boolean isIdentityPart()
          Returns whether the id has to be considered when two features are checked for equality.
 void setIdentityPart(boolean isIdentityPart)
          Sets the 'identiyPart' information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappedGMLId

public MappedGMLId(String prefix,
                   String separator,
                   MappingField[] idFields,
                   IdGenerator idGenerator,
                   MappedGMLId.IDPART_INFO idPartInfo)
Creates a new instance of MappedGMLId from the given parameters.

Parameters:
prefix -
separator -
idFields -
idGenerator -
idPartInfo -
Method Detail

getKeySize

public int getKeySize()
Returns the number of MappingFields that constitute the "gml:id".

Returns:
the number of MappingFields

getIdFields

public MappingField[] getIdFields()
Returns the MappingFields that are used to build the "gml:id".

Returns:
the id fields

getPrefix

public String getPrefix()
Returns the prefix.

Returns:
the prefix

getSeparator

public String getSeparator()
Returns the separator.

Returns:
the separator

getIdPartInfo

public MappedGMLId.IDPART_INFO getIdPartInfo()
Returns whether the configuration explicitly defines that the id has to be considered when two features are checked for equality.

Returns:
'identityPart' information

isIdentityPart

public boolean isIdentityPart()
Returns whether the id has to be considered when two features are checked for equality.

Returns:
true, if the feature id is part of the feature's identity

setIdentityPart

public void setIdentityPart(boolean isIdentityPart)
Sets the 'identiyPart' information.

Parameters:
isIdentityPart - set to true, if feature id should determine feature's identity solely

getIdGenerator

public IdGenerator getIdGenerator()
TODO remove this. Just a quick hack to make ParentIdGenerator work...

Returns:
IdGenerator that is used to generate new feature ids

generateFid

FeatureId generateFid(MappedFeatureType ft,
                      DatastoreTransaction ta)
                throws IdGenerationException
Generates a new and unique feature identifier.

Parameters:
ft -
ta -
Returns:
a new and unique feature identifier.
Throws:
IdGenerationException

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