public void remove() throws IOException { try { dataStore.delete(featureType, last.getID(), st.getConnection()); // issue notification ContentEntry entry = featureSource.getEntry(); ContentState state = entry.getState(this.tx); if (state.hasListener()) { state.fireFeatureRemoved(featureSource, last); } } catch (SQLException e) { throw (IOException) new IOException().initCause(e); } }
public SimpleFeature next() throws IOException, IllegalArgumentException, NoSuchElementException { ensureNext(); try { last.init(); } catch (Exception e) { java.util.logging.Logger.getGlobal().log(java.util.logging.Level.INFO, "", e); } // reset next flag setNext(null); if (this.featureSource.getEntry().getState(tx).hasListener()) { // record bounds as we have a listener who will be interested this.lastBounds = new ReferencedEnvelope(last.getBounds()); } return last; }
public void write() throws IOException { try { // figure out what the fid is PrimaryKey key = dataStore.getPrimaryKey(featureType); String fid = dataStore.encodeFID(key, rs); Id filter = dataStore .getFilterFactory() .id(Collections.singleton(dataStore.getFilterFactory().featureId(fid))); // figure out which attributes changed List<AttributeDescriptor> changed = new ArrayList<AttributeDescriptor>(); List<Object> values = new ArrayList<Object>(); for (AttributeDescriptor att : featureType.getAttributeDescriptors()) { if (last.isDirty(att.getLocalName())) { changed.add(att); values.add(last.getAttribute(att.getLocalName())); } } // do the write dataStore.update(featureType, changed, values, filter, st.getConnection()); // issue notification ContentEntry entry = featureSource.getEntry(); ContentState state = entry.getState(this.tx); if (state.hasListener()) { state.fireFeatureUpdated(featureSource, last, lastBounds); } } catch (Exception e) { throw (IOException) new IOException().initCause(e); } }
ReferencedEnvelope bounds = ReferencedEnvelope.create(getSchema().getCoordinateReferenceSystem()); if (state.hasListener()) { if (state.hasListener()) {
ReferencedEnvelope bounds = ReferencedEnvelope.create(getSchema().getCoordinateReferenceSystem()); if (state.hasListener()) { if (state.hasListener()) {
if (contentState.hasListener()) { if (contentState.hasListener()) {
public SimpleFeature next() throws IOException, IllegalArgumentException, NoSuchElementException { ensureNext(); try { last.init(); } catch (Exception e) { e.printStackTrace(); } //reset next flag next = null; if( this.featureSource.getEntry().getState(tx).hasListener() ){ // record bounds as we have a listener who will be interested this.lastBounds = new ReferencedEnvelope( last.getBounds() ); } return last; }
public void remove() throws IOException { try { dataStore.delete(featureType, last.getID(), st.getConnection()); // issue notification ContentEntry entry = featureSource.getEntry(); ContentState state = entry.getState( this.tx ); if( state.hasListener() ){ state.fireFeatureRemoved( featureSource, last ); } } catch (SQLException e) { throw (IOException) new IOException().initCause(e); } }
public void write() throws IOException { try { //figure out what the fid is PrimaryKey key = dataStore.getPrimaryKey(featureType); String fid = dataStore.encodeFID(key, rs); Id filter = dataStore.getFilterFactory() .id(Collections.singleton(dataStore.getFilterFactory() .featureId(fid))); //figure out which attributes changed List<AttributeDescriptor> changed = new ArrayList<AttributeDescriptor>(); List<Object> values = new ArrayList<Object>(); for (AttributeDescriptor att : featureType.getAttributeDescriptors()) { if (last.isDirrty(att.getLocalName())) { changed.add(att); values.add(last.getAttribute(att.getLocalName())); } } // do the write dataStore.update(featureType, changed, values, filter, st.getConnection()); // issue notification ContentEntry entry = featureSource.getEntry(); ContentState state = entry.getState( this.tx ); if( state.hasListener() ){ state.fireFeatureUpdated( featureSource, last, lastBounds ); } } catch (Exception e) { throw (IOException) new IOException().initCause(e); } }
if( state.hasListener() ){ if( state.hasListener() ){
if( state.hasListener() ){ if( state.hasListener() ){
if (contentState.hasListener()) { if (contentState.hasListener()) {