Examples of featureId()


Examples of org.opengis.filter.FilterFactory2.featureId()

        final String typeName = featureType.getTypeName();
        final BoundingBox bounds = changedFeature.getBounds();
        ReferencedEnvelope referencedEnvelope = ReferencedEnvelope.reference(bounds);
        String fid = changedFeature.getID();
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Filter filter = ff.id(Collections.singleton(ff.featureId(fid)));

        doFireFeaturesChanged(typeName, referencedEnvelope, filter);
    }

    private void fireRemoved(final SimpleFeature removedFeature) {
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.featureId()

        String typeName = featureType.getTypeName();
        BoundingBox bounds = removedFeature.getBounds();
        ReferencedEnvelope referencedEnvelope = ReferencedEnvelope.reference(bounds);
        String fid = removedFeature.getID();
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Filter filter = ff.id(Collections.singleton(ff.featureId(fid)));
        doFireFeaturesRemoved(typeName, referencedEnvelope, filter);
    }

    protected abstract void doFireFeaturesAdded(String typeName, ReferencedEnvelope bounds,
            Filter filter);
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.featureId()

        assertEquals(1, fids.size());
        String featureId = fids.first();
        assertTrue(allFids.contains(featureId));

        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Filter filterOne = ff.id(Collections.singleton(ff.featureId(featureId)));

        assertEquals("no events on AUTO_COMMIT", 0, listener.list.size());
        assertEquals("no events on transaction1", 0, listener1.list.size());
        assertEquals("no events on transaction2", 0, listener2.list.size());
        featureStore1.removeFeatures(filterOne);
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.featureId()

        // assertTrue(String.valueOf(unsupportedFilter), unsupportedFilter instanceof
        // PropertyIsEqualTo);

        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        // @id = 'DELETEME.1' AND STRING_COL = 'test'
        filter = ff.and(ff.id(Collections.singleton(ff.featureId(typeName + ".1"))),
                ff.equals(ff.property("STRING_COL"), ff.literal("test")));

        filteringQuery = new Query(typeName, filter);
        // filteringQuery based on the above filter...
        sdeQuery = createFilteringQuery();
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.featureId()

        assertTrue(String.valueOf(sqlFilter), sqlFilter instanceof And);
        Assert.assertEquals(Filter.INCLUDE, unsupportedFilter);

        // AND( @id = 'DELETEME.1' )
        List<Filter> singleAnded = Collections.singletonList((Filter) ff.id(Collections
                .singleton(ff.featureId(typeName + ".1"))));
        filter = ff.and(singleAnded);

        filteringQuery = new Query(typeName, filter);
        // filteringQuery based on the above filter...
        sdeQuery = createFilteringQuery();
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.featureId()

        ShapefileDataStore ds = (ShapefileDataStore) fac.createDataStore(params);

        FilterFactory2 ff = (FilterFactory2) CommonFactoryFinder.getFilterFactory(GeoTools
                .getDefaultHints());

        FeatureId featureId = ff.featureId("streams.84");
        Id filter = ff.id(Collections.singleton(featureId));
        SimpleFeatureCollection features = ds.getFeatureSource().getFeatures(filter);

        SimpleFeatureIterator iter = features.features();
        ReferencedEnvelope bounds;
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.featureId()

        SimpleFeatureStore roadFromClient2 = (SimpleFeatureStore) store.getFeatureSource("road");
        Transaction transaction2 = new DefaultTransaction("Transaction Used by Client 2");
        roadFromClient2.setTransaction(transaction2);

        FilterFactory2 ff = (FilterFactory2) CommonFactoryFinder.getFilterFactory(null);
        Filter selectFid1 = ff.id(Collections.singleton(ff.featureId("fid1")));

        // Before we edit everything should be the same
        assertEquals("auto before", 5, roadAuto.getFeatures().size());
        assertEquals("client 1 before", 5, roadFromClient1.getFeatures().size());
        assertEquals("client 2 before", 5, roadFromClient2.getFeatures().size());
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.featureId()

            Set<FeatureId> fids = new HashSet<FeatureId>();
            while (indexIter.hasNext()) {
                SimpleFeature newFeature = indexIter.next();
                String id = newFeature.getID();
                expectedFids.add(id);
                fids.add(ff.featureId(id));
            }
            fidFilter = ff.id(fids);
        } finally {
            indexIter.close();
        }
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.featureId()

            invalidFid2 = features.next().getID() + "abc";
            features.close();
        }
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Set<Identifier> ids = new HashSet<Identifier>();
        ids.add(ff.featureId(validFid1));
        ids.add(ff.featureId(validFid2));
        ids.add(ff.featureId(invalidFid1));
        ids.add(ff.featureId(invalidFid2));
        Filter fidFilter = ff.id(ids);
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.featureId()

            features.close();
        }
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Set<Identifier> ids = new HashSet<Identifier>();
        ids.add(ff.featureId(validFid1));
        ids.add(ff.featureId(validFid2));
        ids.add(ff.featureId(invalidFid1));
        ids.add(ff.featureId(invalidFid2));
        Filter fidFilter = ff.id(ids);

        final SimpleFeatureType schema = store.getSchema();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.