|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.DiffFeatureWriter
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 to make explicit that no Features are writen out by this Class.
TransactionStateDiff
Field Summary | |
protected java.util.Map |
diff
|
protected FeatureReader |
reader
|
Constructor Summary | |
DiffFeatureWriter(FeatureReader reader,
java.util.Map diff)
DiffFeatureWriter construction. |
Method Summary | |
void |
close()
Clean up resources associated with this writer. |
FeatureType |
getFeatureType()
Supplys FeatureTypeFrom reader |
boolean |
hasNext()
Query for more content. |
Feature |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected FeatureReader reader
protected java.util.Map diff
Constructor Detail |
public DiffFeatureWriter(FeatureReader reader, java.util.Map diff)
reader
- diff
- Method Detail |
public FeatureType getFeatureType()
getFeatureType
in interface FeatureWriter
FeatureWriter.getFeatureType()
public Feature next() throws java.io.IOException
next
in interface FeatureWriter
java.io.IOException
FeatureWriter.next()
public void remove() throws java.io.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 opperating 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
java.io.IOException
FeatureWriter.remove()
public void write() throws java.io.IOException
write
in interface FeatureWriter
java.io.IOException
FeatureWriter.write()
public boolean hasNext() throws java.io.IOException
hasNext
in interface FeatureWriter
true
if an additional Feature
is
available.
java.io.IOException
FeatureWriter.hasNext()
public void close() throws java.io.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 FeatureWriter
java.io.IOException
- if close has already been called or if there there
are problems releasing underlying resources.FeatureWriter.close()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |