|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDiffContentFeatureWriter
public class DiffContentFeatureWriter
A FeatureWriter that captures modifications against a FeatureReader.
You will eventually need to write out the differences, later.
The api has been implemented in terms of FeatureReader
DiffContentState
Field Summary | |
---|---|
protected Diff |
diff
|
protected FeatureReader<SimpleFeatureType,SimpleFeature> |
reader
|
Constructor Summary | |
---|---|
DiffContentFeatureWriter(ContentFeatureStore store,
Diff diff,
FeatureReader<SimpleFeatureType,SimpleFeature> reader)
DiffFeatureWriter construction. |
Method Summary | |
---|---|
void |
close()
Clean up resources associated with this writer. |
SimpleFeatureType |
getFeatureType()
Supplys FeatureTypeFrom reader |
boolean |
hasNext()
Query for more content. |
SimpleFeature |
next()
Next Feature from reader or new content. |
void |
remove()
Removes current Feature, must be called before hasNext. |
void |
write()
Writes out the current feature. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected FeatureReader<SimpleFeatureType,SimpleFeature> reader
protected Diff diff
Constructor Detail |
---|
public DiffContentFeatureWriter(ContentFeatureStore store, Diff diff, FeatureReader<SimpleFeatureType,SimpleFeature> reader)
reader
- diff
- filter
- Method Detail |
---|
public SimpleFeatureType getFeatureType()
getFeatureType
in interface FeatureWriter<SimpleFeatureType,SimpleFeature>
FeatureWriter.getFeatureType()
public SimpleFeature next() throws IOException
next
in interface FeatureWriter<SimpleFeatureType,SimpleFeature>
IOException
- DOCUMENT ME!FeatureWriter.next()
public void remove() throws IOException
FeatureWriter
FeatureWriters will need to allow all FeatureSources of the same
typeName to issue a FeatureEvent event of type
FeatureEvent.FEATURES_REMOVED
when this method is called.
If this FeatureWriter is opperating against a Transaction FEATURES_REMOVED events should only be sent to FeatureSources operating on the same Transaction. When Transaction commit() is called other FeatureSources will be informed of the modifications.
When the current Feature has been provided as new content, this method "cancels" the add opperation (and notification needed).
remove
in interface FeatureWriter<SimpleFeatureType,SimpleFeature>
IOException
- DOCUMENT ME!FeatureWriter.remove()
public void write() throws IOException
write
in interface FeatureWriter<SimpleFeatureType,SimpleFeature>
IOException
FeatureWriter.write()
public boolean hasNext() throws IOException
hasNext
in interface FeatureWriter<SimpleFeatureType,SimpleFeature>
true
if an additional Feature
is
available.
IOException
- DOCUMENT ME!FeatureWriter.hasNext()
public void close() throws IOException
Diff is not clear()ed as it is assumed that it belongs to a Transaction.State object and may yet be written out.
close
in interface Closeable
close
in interface FeatureWriter<SimpleFeatureType,SimpleFeature>
IOException
- if there there are problems releasing underlying resources, or
possibly if close has been called (up to the implementation).FeatureWriter.close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |