Package org.opengis.filter

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


    }
   
    public void testFidFilter() throws OperationNotSupportedException, IOException{
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
       
        Id fif = ff.id( ff.featureId("f1"),ff.featureId("f2"),ff.featureId("f3"),ff.featureId("f4"));

        StringWriter output = new StringWriter();
        DocumentWriter.writeFragment(fif,
            FilterSchema.getInstance(), output, null);
       
View Full Code Here


    }
   
    public void testFidFilter() throws OperationNotSupportedException, IOException{
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
       
        Id fif = ff.id( ff.featureId("f1"),ff.featureId("f2"),ff.featureId("f3"),ff.featureId("f4"));

        StringWriter output = new StringWriter();
        DocumentWriter.writeFragment(fif,
            FilterSchema.getInstance(), output, null);
       
View Full Code Here

    }
   
    public void testFidFilter() throws OperationNotSupportedException, IOException{
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
       
        Id fif = ff.id( ff.featureId("f1"),ff.featureId("f2"),ff.featureId("f3"),ff.featureId("f4"));

        StringWriter output = new StringWriter();
        DocumentWriter.writeFragment(fif,
            FilterSchema.getInstance(), output, null);
       
View Full Code Here

            Iterator it = diff.getModified().values().iterator();
            FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
            Set<FeatureId> modifiedFids = new HashSet<FeatureId>();
            while(it.hasNext()){
                SimpleFeature feature = (SimpleFeature) it.next();
                modifiedFids.add(ff.featureId(feature.getID()));
            }
            Id idFilter = ff.id(modifiedFids);
            Query q = new Query(query);
            q.setFilter(ff.and(idFilter, query.getFilter()));
            bounds = getBoundsInternal(q);
View Full Code Here

                    SimpleFeature feature = (SimpleFeature) it.next();
                   
                    if(feature == TransactionStateDiff.NULL) {
                        count--;
                    } else {
                        modifiedFids.add(ff.featureId(feature.getID()));
                        if(filter.evaluate(feature)) {
                            modifiedPostCount++;
                        }
                    }
                }
View Full Code Here

       
        ContentFeatureSource source = (ContentFeatureSource) dataStore.getFeatureSource(simpleTypeName1);
       
        WFSFeatureStore store = (WFSFeatureStore) source;
       
        Filter filter = filterfac.id(filterfac.featureId("poi.2"));
       
        store.removeFeatures(filter);
       
        ContentFeatureCollection coll = store.getFeatures();
        assertEquals(2, coll.size());
View Full Code Here

       
        ContentFeatureSource source = (ContentFeatureSource) dataStore.getFeatureSource(simpleTypeName1);
       
        WFSFeatureStore store = (WFSFeatureStore) source;
       
        Filter filter = filterfac.id(filterfac.featureId("poi.2"));
       
        store.modifyFeatures("NAME", "blah", filter);
       
        ContentFeatureCollection coll = store.getFeatures( new Query(simpleTypeName1.getLocalPart(), filter) );
        assertEquals(1, coll.size());
View Full Code Here

        store.setTransaction(transaction);
       
        List<FeatureId> fids = store.addFeatures((SimpleFeatureCollection) collection);       
        assertEquals(1, fids.size());
       
        Filter filterRemove = filterfac.id(filterfac.featureId("poi.2"));       
        store.removeFeatures(filterRemove);
       
        Filter filterUpdate = filterfac.id(filterfac.featureId("poi.3"));       
        store.modifyFeatures("NAME", "blah", filterUpdate);
               
View Full Code Here

        assertEquals(1, fids.size());
       
        Filter filterRemove = filterfac.id(filterfac.featureId("poi.2"));       
        store.removeFeatures(filterRemove);
       
        Filter filterUpdate = filterfac.id(filterfac.featureId("poi.3"));       
        store.modifyFeatures("NAME", "blah", filterUpdate);
               
        transaction.commit();
       
        ContentFeatureCollection coll = store.getFeatures();
View Full Code Here

        FilterFactory2 ffac = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints());
        Set fids = new HashSet();
        try {
            while (iter.hasNext()) {
                String id = iter.next().getID();
                FeatureId fid = ffac.featureId(id);
                fids.add(fid);
            }
            Id filter = ffac.id(fids);
            return filter;
        } finally {
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.