Package org.opengis.filter

Examples of org.opengis.filter.Id


        assertAttributeName(filter, "testGeometry");
    }

    public void testFid() {
        Id filter = fac.id(Collections.singleton(fac.featureId("fakeId")));
        assertAttributeName(filter, new String[0]);
    }
View Full Code Here


                throw new SAXException("Invalid type name for element provided");
            }

            Set<Identifier> fidSet = new HashSet<Identifier>();
            for (int i = 0; i < value.length; i++){
                Id fidFilter = (Id) value[i].getValue();
                fidSet.addAll( fidFilter.getIdentifiers() );
            }           
            FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
            Id r = ff.id( fidSet );

            return r;
        }
View Full Code Here

                throw new SAXException("Invalid type name for element provided");
            }

            Set<Identifier> fidSet = new HashSet<Identifier>();
            for (int i = 0; i < value.length; i++){
                Id fidFilter = (Id) value[i].getValue();
                fidSet.addAll( fidFilter.getIdentifiers() );
            }           
            FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
            Id r = ff.id( fidSet );

            return r;
        }
View Full Code Here

            }

            List<Object> fidList = new ArrayList<Object>();

            for (int i = 0; i < value.length; i++){
                Id id = (Id) value[i].getValue();
                fidList.addAll( id.getIDs() );
            }
            return fidList;
        }
View Full Code Here

            if (!getName().equals(element.getType().getName())) {
                throw new SAXException("Invalid type name for element provided");
            }

            String lockId = (String) value[0].getValue();
            Id in = null;
            Id out = null;
            int i = 1;

            if ((i < value.length)
                    && elems[1].getType().getName().equals(value[i].getElement()
                                                                       .getType()
View Full Code Here

            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);
           
            // update with the diff contents, all added feature and all modified, not deleted ones
View Full Code Here

                }
               
                // consider the updated feature if any, we need to know how
                // many of those matched the filter before
                if(modifiedFids.size() > 0) {
                    Id idFilter = ff.id(modifiedFids);
                    Query q = new Query(query);
                    q.setFilter(ff.and(idFilter, query.getFilter()));
                    int modifiedPreCount = getCountInternal(q);
                    if(modifiedPreCount == -1) {
                        return -1;
View Full Code Here

    }

    public void testGetFeaturesWithIdFilter() throws Exception {
        init();
        FilterFactory ff = dataStore.getFilterFactory();
        Id id = ff.id(new HashSet<FeatureId>(Arrays.asList(ff.featureId(this.layerName + ".1"),
                ff.featureId(this.layerName + ".7"))));
        SimpleFeatureCollection features = featureSource.getFeatures(id);
        assertEquals(2, features.size());
        SimpleFeatureIterator iterator = features.features();
        assertTrue(iterator.hasNext());
View Full Code Here

        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);

        //test that only the listener listening with the current transaction gets the event.
        final SimpleFeature feature = roadFeatures[0];
        Id fidFilter = ff.id(Collections.singleton(ff.featureId(feature.getID())));
       
        store1.removeFeatures(fidFilter);
       
        assertEquals(1, listener1.events.size());
        assertEquals(0, listener2.events.size());
View Full Code Here

       
        Filter filter = fts.getRules()[0].getFilter();
        assertTrue( filter instanceof Id);

        Id fidFilter = (Id) filter;
        Set ids = fidFilter.getIDs();
        String[] fids = (String[]) ids.toArray(new String[ ids.size()] );
        assertEquals("Wrong number of fids", 5, fids.length);
       
        Arrays.sort(fids);
       
View Full Code Here

TOP

Related Classes of org.opengis.filter.Id

Copyright © 2018 www.massapicom. 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.