Package org.opengis.filter

Examples of org.opengis.filter.FilterFactory.equal()


        //multivalued literals with multivalued fields
       
        values = new ArrayList<Keyword>();
        values.add(new Keyword("keyword1"));
        values.add(new Keyword("keyword2"))
        filter = factory.equal(factory.literal(values), factory.property("keywords"), true, MatchAction.ANY);
        expected = Sets.newHashSet(ft1, ft2);
        actual = Sets.newHashSet(catalog.list(FeatureTypeInfo.class, filter));
        assertEquals(expected, actual);
       
        values = new ArrayList<Keyword>();
View Full Code Here


        assertEquals(expected, actual);
       
        values = new ArrayList<Keyword>();
        values.add(new Keyword("keyword1"));
        values.add(new Keyword("keyword1"))
        filter = factory.equal(factory.literal(values), factory.property("keywords"), true, MatchAction.ALL);
        expected = Sets.newHashSet(ft2);
        actual = Sets.newHashSet(catalog.list(FeatureTypeInfo.class, filter));
        assertEquals(expected, actual);
       
        values = new ArrayList<Keyword>();
View Full Code Here

        assertEquals(expected, actual);
       
        values = new ArrayList<Keyword>();
        values.add(new Keyword("keyword1"));
        values.add(new Keyword("blah"));
        filter = factory.equal(factory.literal(values), factory.property("keywords"), true, MatchAction.ONE);
        expected = Sets.newHashSet(ft1);
        actual = Sets.newHashSet(catalog.list(FeatureTypeInfo.class, filter));
        assertEquals(expected, actual);

    }
View Full Code Here

            QueryType queryType = (QueryType) request.getQuery().get(0);
            if(queryType.getFunction().size()>0) {
                Function syncFunction = (Function) queryType.getFunction().get(0);
                List<FeatureCollection> filtered = new ArrayList<FeatureCollection>();
                FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
                Filter f = ff.equal(ff.literal("true"), syncFunction, false);
               
              
                for(FeatureCollection fc : (List<FeatureCollection>)featureCollection.getFeature()) {
                    filtered.add(new FilteringFeatureCollection<FeatureType, Feature>(fc, f));
                }
View Full Code Here

        }

        if(syncFunction != null) {
            List<FeatureCollection> filtered = new ArrayList<FeatureCollection>();
            FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
            Filter f = ff.equal(ff.literal("true"), syncFunction, false);
            for(FeatureCollection fc : (List<FeatureCollection>)results.getFeature())
                filtered.add(new FilteringFeatureCollection<FeatureType, Feature>(fc, f));
            results.getFeature().clear();
            results.getFeature().addAll(filtered);
        }
View Full Code Here

        // disallow getfeatureinfo on the states layer
        tam.putLimits("cite_noinfo", states, new WMSAccessLimits(CatalogMode.HIDE, Filter.INCLUDE,
                null, false));
        // cascade CQL filter, allow feature info
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        Filter texas = ff.equal(ff.property("STATE_NAME"), ff.literal("Texas"), false);
        tam.putLimits("cite_texas", states,
                new WMSAccessLimits(CatalogMode.HIDE, texas, null, true));
    }

    public void testGetMapNoRestrictions() throws Exception {
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.