/** * Writes out the current feature. * * @throws IOException * @see org.geotools.data.FeatureWriter#write() */ public void write() throws IOException { if (writer == null) { throw new IOException("FeatureWriter has been closed"); } writer.write(); if (feature == null) { throw new IOException("No feature available to write"); } if (writer.hasNext()) { // modify existing feature ReferencedEnvelope bounds = ReferencedEnvelope.reference(feature.getBounds()); state.fireFeatureUpdated(store, feature, bounds); feature = null; } else { // modify a new feature - ie we are adding something state.fireFeatureAdded(store, feature); } }
state.fireFeatureAdded(featureSource, cur);
public void write() throws IOException { if (live == null) { throw new IOException("No current feature to write"); } if (live.equals(origional)) { writeImplementation(origional); } else { writeImplementation(live); // String typeName = live.getFeatureType().getTypeName(); // Transaction autoCommit = Transaction.AUTO_COMMIT; if (origional != null) { ReferencedEnvelope bounds = ReferencedEnvelope.reference(live.getBounds()); bounds.include(origional.getBounds()); state.fireFeatureUpdated(featureSource, live, bounds); // store.listenerManager.fireFeaturesChanged(typeName, autoCommit, bounds, false); } else { state.fireFeatureAdded(featureSource, live); // store.listenerManager.fireFeaturesAdded(typeName, autoCommit, // ReferencedEnvelope.reference(live.getBounds()), false); } } origional = null; live = null; } // write end
state.fireFeatureAdded(store, current); current = null; } else {
public void write() throws IOException { try { //do the insert dataStore.insert(last, featureType, st.getConnection()); //the datastore sets as userData, grab it and update the fid String fid = (String) last.getUserData().get( "fid" ); last.setID( fid ); ContentEntry entry = featureSource.getEntry(); ContentState state = entry.getState( this.tx ); state.fireFeatureAdded( featureSource, last ); } catch (SQLException e) { throw (IOException) new IOException().initCause(e); } }
/** * Writes out the current feature. * * @throws IOException * * @see org.geotools.data.FeatureWriter#write() */ public void write() throws IOException { writer.write(); if (feature == null) { throw new IOException("No feature available to write"); } if (writer.hasNext()) { // modify existing feature ReferencedEnvelope bounds = ReferencedEnvelope.reference(feature.getBounds()); state.fireFeatureUpdated(store, feature, bounds); feature = null; } else { // modify a new feature - ie we are adding something state.fireFeatureAdded(store, feature); } }
state.fireFeatureAdded(store, current); current = null; } else {
state.fireFeatureAdded(store, nextFeature); } catch (IllegalAttributeException e) { throw new DataSourceException("Could update " + fid, e);