Package org.geotools.data.wfs
Class WFSFeatureWriter
- Object
-
- DiffContentFeatureWriter
-
- WFSFeatureWriter
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,FeatureWriter<SimpleFeatureType,SimpleFeature>
public class WFSFeatureWriter extends DiffContentFeatureWriter
-
-
Field Summary
-
Fields inherited from class DiffContentFeatureWriter
diff, reader
-
-
Constructor Summary
Constructors Constructor Description WFSFeatureWriter(WFSFeatureStore store, WFSLocalTransactionState localSate, FeatureReader<SimpleFeatureType,SimpleFeature> reader, boolean autoCommit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class DiffContentFeatureWriter
close, getFeatureType
-
-
-
-
Constructor Detail
-
WFSFeatureWriter
public WFSFeatureWriter(WFSFeatureStore store, WFSLocalTransactionState localSate, FeatureReader<SimpleFeatureType,SimpleFeature> reader, boolean autoCommit)
-
-
Method Detail
-
write
public void write() throws IOException
Description copied from class:DiffContentFeatureWriter
Writes out the current feature.- Specified by:
write
in interfaceFeatureWriter<SimpleFeatureType,SimpleFeature>
- Overrides:
write
in classDiffContentFeatureWriter
- Throws:
IOException
- See Also:
FeatureWriter.write()
-
remove
public void remove() throws IOException
Description copied from interface:FeatureWriter
Removes current Feature, must be called before hasNext.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).
- Specified by:
remove
in interfaceFeatureWriter<SimpleFeatureType,SimpleFeature>
- Overrides:
remove
in classDiffContentFeatureWriter
- Throws:
IOException
- See Also:
FeatureWriter.remove()
-
hasNext
public boolean hasNext() throws IOException
Description copied from class:DiffContentFeatureWriter
Query for more content.- Specified by:
hasNext
in interfaceFeatureWriter<SimpleFeatureType,SimpleFeature>
- Overrides:
hasNext
in classDiffContentFeatureWriter
- Returns:
true
if an additionalFeature
is available,false
if not.- Throws:
IOException
- if an I/O error occurs.- See Also:
FeatureWriter.hasNext()
-
next
public SimpleFeature next() throws IOException
Description copied from class:DiffContentFeatureWriter
Next Feature from reader or new content.- Specified by:
next
in interfaceFeatureWriter<SimpleFeatureType,SimpleFeature>
- Overrides:
next
in classDiffContentFeatureWriter
- Returns:
- Feature from Query, or newly appended Feature
- Throws:
IOException
- if the writer has been closed or an I/O error occurs reading the nextFeature
.- See Also:
FeatureWriter.next()
-
-