org.geotools.data.postgis
Class FeatureDiffReaderImpl

java.lang.Object
  extended by org.geotools.data.postgis.FeatureDiffReaderImpl
All Implemented Interfaces:
FeatureDiffReader

public class FeatureDiffReaderImpl
extends java.lang.Object
implements FeatureDiffReader

Provides forward only access to the feature differences

Since:
2.4
Author:
aaime

Field Summary
protected static java.util.logging.Logger LOGGER
          The logger for the postgis module.
 
Constructor Summary
FeatureDiffReaderImpl(FeatureDiffReaderImpl other)
          Allows to clone a diff reader, this makes it possible to scroll over the same diffs with multiple readers at the same time (reset allows only for multiple isolated scans)
FeatureDiffReaderImpl(VersionedPostgisDataStore store, Transaction transaction, org.opengis.feature.simple.SimpleFeatureType externalFeatureType, org.geotools.data.postgis.RevisionInfo fromVersion, org.geotools.data.postgis.RevisionInfo toVersion, VersionedFIDMapper mapper, ModifiedFeatureIds modifiedIds)
           
 
Method Summary
 void close()
          Release the underlying resources associated with this stream.
protected  void finalize()
           
 java.lang.String getFromVersion()
          The first version used to compute the difference
 org.opengis.feature.simple.SimpleFeatureType getSchema()
          Returns the feature type whose features are diffed with this reader
 java.lang.String getToVersion()
          The second version used to computed the difference
 boolean hasNext()
          Query whether this FeatureDiffReader has another FeatureDiff.
 FeatureDiffImpl next()
          Reads the next FeatureDifference
 void reset()
          Resets the reader to the initial position
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final java.util.logging.Logger LOGGER
The logger for the postgis module.

Constructor Detail

FeatureDiffReaderImpl

public FeatureDiffReaderImpl(VersionedPostgisDataStore store,
                             Transaction transaction,
                             org.opengis.feature.simple.SimpleFeatureType externalFeatureType,
                             org.geotools.data.postgis.RevisionInfo fromVersion,
                             org.geotools.data.postgis.RevisionInfo toVersion,
                             VersionedFIDMapper mapper,
                             ModifiedFeatureIds modifiedIds)
                      throws java.io.IOException
Throws:
java.io.IOException

FeatureDiffReaderImpl

public FeatureDiffReaderImpl(FeatureDiffReaderImpl other)
                      throws java.io.IOException
Allows to clone a diff reader, this makes it possible to scroll over the same diffs with multiple readers at the same time (reset allows only for multiple isolated scans)

Parameters:
other -
Throws:
java.io.IOException
Method Detail

getFromVersion

public java.lang.String getFromVersion()
The first version used to compute the difference

Specified by:
getFromVersion in interface FeatureDiffReader
Returns:

getToVersion

public java.lang.String getToVersion()
The second version used to computed the difference

Specified by:
getToVersion in interface FeatureDiffReader
Returns:

getSchema

public org.opengis.feature.simple.SimpleFeatureType getSchema()
Returns the feature type whose features are diffed with this reader

Specified by:
getSchema in interface FeatureDiffReader
Returns:

next

public FeatureDiffImpl next()
                     throws java.io.IOException,
                            java.util.NoSuchElementException
Reads the next FeatureDifference

Specified by:
next in interface FeatureDiffReader
Returns:
The next FeatureDifference
Throws:
java.io.IOException - If an error occurs reading the FeatureDifference.
java.util.NoSuchElementException - If there are no more Features in the Reader.

hasNext

public boolean hasNext()
                throws java.io.IOException
Query whether this FeatureDiffReader has another FeatureDiff.

Specified by:
hasNext in interface FeatureDiffReader
Returns:
True if there are more differences to be read. In other words, true if calls to next would return a feature rather than throwing an exception.
Throws:
java.io.IOException - If an error occurs determining if there are more Features.

reset

public void reset()
           throws java.io.IOException
Resets the reader to the initial position

Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Release the underlying resources associated with this stream.

Specified by:
close in interface FeatureDiffReader
Throws:
java.io.IOException - DOCUMENT ME!

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable


Copyright © 1996-2010 Geotools. All Rights Reserved.