Package org.opengis.filter

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


        // check null
        names = DataUtilities.attributeNames(filter);
        assertEquals(names.length, 0);

        Id fidFilter = factory.id(Collections.singleton(factory.featureId("fid")));

        // check fidFilter
        names = DataUtilities.attributeNames(fidFilter);
        assertEquals(0, names.length);
View Full Code Here


        Transaction tx = new DefaultTransaction();
        store.setTransaction( tx );
        store.setFeatureLock(lock);
        tx.addAuthorization(lock.getAuthorization());
       
        Filter f1 = ff.id( Collections.singleton( ff.featureId( tname("ft1")+".1")));
        store.lockFeatures(f1);
       
        Transaction tx1 = new DefaultTransaction();
        store.setTransaction( tx1 );
       
View Full Code Here

        assertMultiPrimaryKeyValues(features,4);
       
        //test with a filter
        FilterFactory ff = dataStore.getFilterFactory();
       
        Id id = ff.id( Collections.singleton( ff.featureId( tname("multi") + ".1.x") ) );
        features = fs.getFeatures( id );
        assertEquals( 1, features.size() );
    }

    void assertMultiPrimaryKeyValues( final FeatureCollection features, int count ) throws Exception {
View Full Code Here

        };

        // build a filter that will retrieve one feature only
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        fid = RENAMED + ".1107531701011";
        fidFilter = ff.id(Collections.singleton(ff.featureId(fid)));
    }

    @Override
    protected void tearDown() throws Exception {
        IOUtils.delete(data);
View Full Code Here

        SimpleFeatureSource fs = rts.getFeatureSource(RENAMED);

        // build a filter that will retrieve that feature only
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        final String fid = RENAMED + ".1107531701011";
        Filter fidFilter = ff.id(Collections.singleton(ff.featureId(fid)));

        SimpleFeatureCollection fc = fs.getFeatures(new Query(RENAMED, fidFilter));
        assertEquals(RENAMED, fc.getSchema().getName().getLocalPart());
        assertEquals(1, fc.size());
        FeatureIterator <SimpleFeature> it = fc.features();
View Full Code Here

        assertEquals(1, rs.getTypeNames().length);
        assertEquals(BRIDGES.getLocalPart(), rs.getTypeNames()[0]);

        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        String fid = BRIDGES.getLocalPart() + ".1107531701011";
        Filter fidFilter = ff.id(Collections.singleton(ff.featureId(fid)));

        SimpleFeatureIterator it = retyped.getFeatures(fidFilter).features();
        assertTrue(it.hasNext());
        SimpleFeature f = it.next();
        assertFalse(it.hasNext());
View Full Code Here

                "restricted.105");
        insert.getFeature().add(f);

        DeleteElementType delete = wfs.createDeleteElementType();
        delete.setTypeName(restricted);
        delete.setFilter(ff.id(Collections.singleton(ff.featureId("restricted.23"))));

        UpdateElementType update = wfs.createUpdateElementType();
        update.setTypeName(restricted);
        update.setFilter(ff.id(Collections.singleton(ff.featureId("restricted.21"))));
        PropertyType property = wfs.createPropertyType();
View Full Code Here

        delete.setTypeName(restricted);
        delete.setFilter(ff.id(Collections.singleton(ff.featureId("restricted.23"))));

        UpdateElementType update = wfs.createUpdateElementType();
        update.setTypeName(restricted);
        update.setFilter(ff.id(Collections.singleton(ff.featureId("restricted.21"))));
        PropertyType property = wfs.createPropertyType();
        property.setName(new QName(SF_NAMESPACE, "cat"));
        property.setValue(-48);
        update.getProperty().add(property);
View Full Code Here

        SimpleFeature f = SimpleFeatureBuilder.build(ft, new Object[] {123, polygon}, "restricted.105");
        insert.getFeature().add(f);
       
        DeleteElementType delete = wfs.createDeleteElementType();
        delete.setTypeName(restricted);
        delete.setFilter(ff.id(Collections.singleton(ff.featureId("restricted.23"))));
       
        UpdateElementType update = wfs.createUpdateElementType();
        update.setTypeName(restricted);
        update.setFilter(ff.id(Collections.singleton(ff.featureId("restricted.21"))));
        PropertyType property = wfs.createPropertyType();
View Full Code Here

        delete.setTypeName(restricted);
        delete.setFilter(ff.id(Collections.singleton(ff.featureId("restricted.23"))));
       
        UpdateElementType update = wfs.createUpdateElementType();
        update.setTypeName(restricted);
        update.setFilter(ff.id(Collections.singleton(ff.featureId("restricted.21"))));
        PropertyType property = wfs.createPropertyType();
        property.setName(new QName(SF_NAMESPACE, "cat"));
        property.setValue(-48);
        update.getProperty().add(property);
       
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.