Package org.opengis.filter

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


            }
        }

        // test fid filter
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
        query.setFilter( ff.id( ff.featureId(fid)));
        if( get ){
             FeatureReader<SimpleFeatureType, SimpleFeature> fr = wfs.getFeatureReaderGet(query,Transaction.AUTO_COMMIT);
            try{
                assertNotNull("FeatureType was null",ft);
                int j=0;while(fr.hasNext()){ assertEquals(fid,fr.next().getID());j++;}
View Full Code Here


        query.setMaxFeatures(1000);
        query.setPropertyNames(new String[] { "cat", "the_geom" });
        query.setCoordinateSystem(CRS.decode("EPSG:23030"));

        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Filter filter = ff.id(Collections.singleton(ff.featureId("archsites.1")));
        query.setFilter(filter);

        WFSResponse response;

        wfs.setDescribeFeatureTypeURLOverride(TestData.url(this, GEOS_ARCHSITES.SCHEMA));
View Full Code Here

                return Filter.EXCLUDE;
            }
            String fid = feature.getID();
            if( fid != null ){
                FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
                FeatureId identifier = ff.featureId( fid );
                HashSet<FeatureId> fids = new HashSet<FeatureId>();
                fids.add( identifier );               
                Filter filter = ff.id( fids );
        
                return filter;
View Full Code Here

SimpleFeatureCollection grabSelectedIds(Set<String> selection) throws IOException {
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
   
    Set<FeatureId> fids = new HashSet<FeatureId>();
    for (String id : selection) {
        FeatureId fid = ff.featureId(id);
        fids.add(fid);
    }
    Filter filter = ff.id(fids);
    return featureSource.getFeatures(filter);
}
View Full Code Here

    fts2.featureTypeNames().add(new NameImpl("feature-type-2"));
   
    // creating the rule 1
    Rule rule1 = styleFactory.createRule();
    rule1.setName("rule1");
    Filter aFilter = filterFactory.id(Collections.singleton(filterFactory.featureId("FID")));
    rule1.setFilter(aFilter);
    fts2.rules().add(rule1);
   
    // creating the rule 2
    Rule rule2 = styleFactory.createRule();
View Full Code Here

public void id(){
    // id start
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
    Filter filter;
   
    filter = ff.id(ff.featureId("CITY.98734597823459687235"),
                   ff.featureId("CITY.98734592345235823474"));
    // id end
}

public void rid() throws Exception {
View Full Code Here

    // id start
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
    Filter filter;
   
    filter = ff.id(ff.featureId("CITY.98734597823459687235"),
                   ff.featureId("CITY.98734592345235823474"));
    // id end
}

public void rid() throws Exception {
    // rid start
View Full Code Here

    // rid start
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
    Filter filter;
   
    // grab a specific revision
    filter = ff.id( ff.featureId("CITY.98734597823459687235","A457") );
   
    // You can also use ResourceId to grab a specific revision
    filter = ff.id( ff.resourceId("CITY.98734597823459687235","A457", new Version()) );
   
    // grab the one before that
View Full Code Here

    // idSet start
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
    Filter filter;
   
    Set<FeatureId> selected = new HashSet<FeatureId>();
    selected.add(ff.featureId("CITY.98734597823459687235"));
    selected.add(ff.featureId("CITY.98734592345235823474"));
   
    filter = ff.id(selected);
    // idSet end
}
View Full Code Here

    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
    Filter filter;
   
    Set<FeatureId> selected = new HashSet<FeatureId>();
    selected.add(ff.featureId("CITY.98734597823459687235"));
    selected.add(ff.featureId("CITY.98734592345235823474"));
   
    filter = ff.id(selected);
    // idSet end
}
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.