Package org.opengis.filter

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


    }
   
    public void testModifyLockedFeatures() throws Exception {
        FilterFactory ff = dataStore.getFilterFactory();
       
        Filter f0 = ff.equal( ff.property( aname("intProperty" ) ), ff.literal(1000), true);
        assertEquals( 0 , store.getCount( new DefaultQuery( tname("ft1"), f0 ) ));
       
        FeatureLock lock =
            FeatureLockFactory.generate(tname("ft1"), 60 * 60 * 1000);
       
View Full Code Here


        }

        assertNotNull(keyValue);

        FilterFactory ff = CommonFactoryFinder.getFilterFactory();
        Filter filter = ff.equal(ff.property(key), ff.literal(keyValue), false);

        assertEquals(1, fs.getCount(new Query(tname("nonfirst"), filter)));

        try {
            fs.modifyFeatures(key, 10, filter);
View Full Code Here

        }

        fs.modifyFeatures(new String[]{aname("name"), key, aname("geom")}, new Object[]{"foo", 10, null}, filter);

        try {
            r = fs.getReader(ff.equal(ff.property(key), ff.literal(keyValue), true));
            assertTrue(r.hasNext());

            SimpleFeature f = (SimpleFeature) r.next();
            assertEquals("foo", f.getAttribute(aname("name")));
        }
View Full Code Here

                .getBean("testResourceAccessManager");
        Catalog catalog = getCatalog();
        FeatureTypeInfo buildings = catalog.getFeatureTypeByName(getLayerId(MockData.BUILDINGS));

        // limits for mr readfilter
        Filter fid113 = ff.equal(ff.property("FID"), ff.literal("113"), false);
        tam.putLimits("cite_readfilter", buildings, new VectorAccessLimits(CatalogMode.HIDE, null,
                fid113, null, null));

        // limits for mr readatts (both limited read attributes and features)
        List<PropertyName> readAtts = Arrays.asList(ff.property("the_geom"), ff.property("FID"));
View Full Code Here

                .getBean("testResourceAccessManager");
        Catalog catalog = getCatalog();
        FeatureTypeInfo gu = catalog.getFeatureTypeByName("gsml:GeologicUnit");

        // limits for mr readfilter
        Filter f = ff.equal(ff.property("purpose"), ff.literal("instance"), false);
        tam.putLimits("cite_readfilter", gu, new VectorAccessLimits(CatalogMode.HIDE, null, f,
                null, null));

        List<PropertyName> readAtts = Arrays.asList(ff.property("composition"), ff
                .property("outcropCharacter"));
View Full Code Here

                .getBean("testResourceAccessManager");
        Catalog catalog = getCatalog();
        FeatureTypeInfo buildings = catalog.getFeatureTypeByName(getLayerId(SystemTestData.BUILDINGS));

        // limits for mr readfilter
        Filter fid113 = ff.equal(ff.property("FID"), ff.literal("113"), false);
        tam.putLimits("cite_readfilter", buildings, new VectorAccessLimits(CatalogMode.HIDE, null,
                fid113, null, null));

        // limits for mr readatts (both limited read attributes and features)
        List<PropertyName> readAtts = Arrays.asList(ff.property("the_geom"), ff.property("FID"));
View Full Code Here

                .getBean("testResourceAccessManager");
        Catalog catalog = getCatalog();
        FeatureTypeInfo gu = catalog.getFeatureTypeByName("gsml:GeologicUnit");

        // limits for mr readfilter
        Filter f = ff.equal(new AttributeExpressionImpl("gsml:purpose", ns), ff.literal("instance"), false);
        tam.putLimits("cite_readfilter", gu, new VectorAccessLimits(CatalogMode.HIDE, null, f,
                null, null));

        List<PropertyName> readAtts = Arrays.asList(ff.property("gsml:composition"),
                ff.property("gsml:outcropCharacter"));
View Full Code Here

        Filter filter = acceptAll();
        Set<? extends CatalogInfo> expected;
        Set<? extends CatalogInfo> actual;
       
        // opposite equality
        filter = factory.equal(factory.literal(ft1.getId()), factory.property("id"), true);
        expected = Sets.newHashSet(ft1);
        actual = Sets.newHashSet(catalog.list(ResourceInfo.class, filter));
        assertEquals(expected, actual);
       
        // match case
View Full Code Here

        expected = Sets.newHashSet(ft1);
        actual = Sets.newHashSet(catalog.list(ResourceInfo.class, filter));
        assertEquals(expected, actual);
       
        // match case
        filter = factory.equal(factory.literal("FT1"), factory.property("name"), false);
        expected = Sets.newHashSet(ft1);
        actual = Sets.newHashSet(catalog.list(ResourceInfo.class, filter));
        assertEquals(expected, actual);
       
        // equality of fields
View Full Code Here

        expected = Sets.newHashSet(ft1);
        actual = Sets.newHashSet(catalog.list(ResourceInfo.class, filter));
        assertEquals(expected, actual);
       
        // equality of fields
        filter = factory.equal(factory.property("name"), factory.property("description"), true);
        expected = Sets.newHashSet(ft2);
        actual = Sets.newHashSet(catalog.list(ResourceInfo.class, filter));
        assertEquals(expected, actual);
       
        // match case
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.