public class WFSFeatureWriter extends DiffContentFeatureWriter
diff, reader
Constructor and Description |
---|
WFSFeatureWriter(WFSFeatureStore store,
WFSLocalTransactionState localSate,
FeatureReader<SimpleFeatureType,SimpleFeature> reader,
boolean autoCommit) |
Modifier and Type | Method and Description |
---|---|
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.
|
close, getFeatureType
public WFSFeatureWriter(WFSFeatureStore store, WFSLocalTransactionState localSate, FeatureReader<SimpleFeatureType,SimpleFeature> reader, boolean autoCommit)
public void write() throws IOException
DiffContentFeatureWriter
write
in interface FeatureWriter<SimpleFeatureType,SimpleFeature>
write
in class DiffContentFeatureWriter
IOException
FeatureWriter.write()
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>
remove
in class DiffContentFeatureWriter
IOException
- DOCUMENT ME!FeatureWriter.remove()
public boolean hasNext() throws IOException
DiffContentFeatureWriter
hasNext
in interface FeatureWriter<SimpleFeatureType,SimpleFeature>
hasNext
in class DiffContentFeatureWriter
true
if an additional Feature
is available, false
if not.IOException
- if an I/O error occurs.FeatureWriter.hasNext()
public SimpleFeature next() throws IOException
DiffContentFeatureWriter
next
in interface FeatureWriter<SimpleFeatureType,SimpleFeature>
next
in class DiffContentFeatureWriter
IOException
- if the writer has been closed or an I/O error occurs reading the next
Feature
.FeatureWriter.next()
Copyright © 1996–2019 Geotools. All rights reserved.