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 booleanhasNext()Query for more content.SimpleFeaturenext()Next Feature from reader or new content.voidremove()Removes current Feature, must be called before hasNext.voidwrite()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 IOExceptionDescription copied from class:DiffContentFeatureWriterWrites out the current feature.- Specified by:
writein interfaceFeatureWriter<SimpleFeatureType,SimpleFeature>- Overrides:
writein classDiffContentFeatureWriter- Throws:
IOException- See Also:
FeatureWriter.write()
-
remove
public void remove() throws IOExceptionDescription copied from interface:FeatureWriterRemoves 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_REMOVEDwhen 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:
removein interfaceFeatureWriter<SimpleFeatureType,SimpleFeature>- Overrides:
removein classDiffContentFeatureWriter- Throws:
IOException- See Also:
FeatureWriter.remove()
-
hasNext
public boolean hasNext() throws IOExceptionDescription copied from class:DiffContentFeatureWriterQuery for more content.- Specified by:
hasNextin interfaceFeatureWriter<SimpleFeatureType,SimpleFeature>- Overrides:
hasNextin classDiffContentFeatureWriter- Returns:
trueif an additionalFeatureis available,falseif not.- Throws:
IOException- if an I/O error occurs.- See Also:
FeatureWriter.hasNext()
-
next
public SimpleFeature next() throws IOException
Description copied from class:DiffContentFeatureWriterNext Feature from reader or new content.- Specified by:
nextin interfaceFeatureWriter<SimpleFeatureType,SimpleFeature>- Overrides:
nextin 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()
-
-