org.geotools.data
Interface FeatureDiff

All Known Implementing Classes:
FeatureDiffImpl

public interface FeatureDiff

Represents the changes occurred between two versions of the same simple feature

Since:
2.6
Author:
Andrea Aime - OpenGeo

Field Summary
static int DELETED
          Feature existed in fromVersion, but has been deleted (change map is empty)
static int INSERTED
          Feature does not exists in fromVersion, has been created in the meantime (change map contains all attributes in this case)
static int UPDATED
          Feature exists in both versions, but has been modified
 
Method Summary
 java.util.List getChangedAttributes()
          Returns a read only list of modified attribute names if state is UPDATED, an empty list otherwise
 org.opengis.feature.simple.SimpleFeature getFeature()
          Returns the inserted feature, if the state is INSERTED, the new feature, if the state is UPDATED, null otherwise
 java.lang.String getID()
          The feature ID
 org.opengis.feature.simple.SimpleFeature getOldFeature()
          Returns the old feature, if the state is UPDATED or DELETED, null otherwise
 int getState()
          The type of difference, either:: UPDATED INSERTED DELETED
 

Field Detail

INSERTED

static final int INSERTED
Feature does not exists in fromVersion, has been created in the meantime (change map contains all attributes in this case)

See Also:
Constant Field Values

UPDATED

static final int UPDATED
Feature exists in both versions, but has been modified

See Also:
Constant Field Values

DELETED

static final int DELETED
Feature existed in fromVersion, but has been deleted (change map is empty)

See Also:
Constant Field Values
Method Detail

getChangedAttributes

java.util.List getChangedAttributes()
Returns a read only list of modified attribute names if state is UPDATED, an empty list otherwise

Returns:

getID

java.lang.String getID()
The feature ID

Returns:

getState

int getState()
The type of difference, either::

Returns:

getFeature

org.opengis.feature.simple.SimpleFeature getFeature()
Returns the inserted feature, if the state is INSERTED, the new feature, if the state is UPDATED, null otherwise


getOldFeature

org.opengis.feature.simple.SimpleFeature getOldFeature()
Returns the old feature, if the state is UPDATED or DELETED, null otherwise



Copyright © 1996-2010 Geotools. All Rights Reserved.