TransformFeatureStore extends TransformFeatureSource implements SimpleFeatureStore { @Override public void removeFeatures(Filter filter) throws IOException { Filter transformed = transformer.transformFilter(filter); store.removeFeatures(transformed); } TransformFeatureStore(SimpleFeatureStore store, Name name, List<Definition> definitions); @Override void setTransaction(Transaction transaction); @Override Transaction getTransaction(); @Override void removeFeatures(Filter filter); @Override List<FeatureId> addFeatures(
            FeatureCollection<SimpleFeatureType, SimpleFeature> collection); @Override void setFeatures(FeatureReader<SimpleFeatureType, SimpleFeature> reader); @Override void modifyFeatures(Name[] attributeNames, Object[] attributeValues, Filter filter); @Override void modifyFeatures(AttributeDescriptor[] type, Object[] value, Filter filter); @Override void modifyFeatures(Name attributeName, Object attributeValue, Filter filter); @Override void modifyFeatures(AttributeDescriptor type, Object value, Filter filter); @Override void modifyFeatures(String name, Object attributeValue, Filter filter); @Override void modifyFeatures(String[] nameArray, Object[] attributeValues, Filter filter);  }
@Test public void testDeleteOnSelection() throws Exception { Filter f = CQL.toFilter("state_name = 'Delaware'"); SimpleFeatureStore transformed = (SimpleFeatureStore) transformWithSelection(); transformed.removeFeatures(f); int size = STATES.getCount(Query.ALL); assertEquals(9, size); assertEquals(0, STATES.getFeatures(f).size()); assertEquals(0, transformed.getFeatures(f).size()); }
@Test public void testDeleteOnRename() throws Exception { Filter f = CQL.toFilter("name = 'Delaware'"); SimpleFeatureStore transformed = (SimpleFeatureStore) transformWithRename(); transformed.removeFeatures(f); int size = STATES.getCount(Query.ALL); assertEquals(9, size); assertEquals(0, STATES.getFeatures(f).size()); assertEquals(0, transformed.getFeatures(f).size()); }
@Test public void testDeleteOnTransform() throws Exception { Filter f = CQL.toFilter("name = 'delaware'"); SimpleFeatureStore transformed = (SimpleFeatureStore) transformWithPartialTransform(); transformed.removeFeatures(f); int size = STATES.getCount(Query.ALL); assertEquals(9, size); assertEquals(0, STATES.getFeatures(f).size()); assertEquals(0, transformed.getFeatures(f).size()); f = CQL.toFilter("people = total"); transformed.removeFeatures(f); assertEquals(0, STATES.getFeatures(Query.ALL).size()); assertEquals(0, transformed.getFeatures(Query.ALL).size()); }