Package org.opengis.filter

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


        UpdateElementType update = wfsfac.createUpdateElementType();
        PropertyType propertyType = wfsfac.createPropertyType();
        propertyType.setName(new QName("http://my.namespace","myproperty","mn"));
        update.getProperty().add(propertyType);
        update.setTypeName(new QName("http://my.namespace","mytypename","mn"));
        update.setFilter(filterfac.id( filterfac.featureId("someid")));
       
        //try with string
        propertyType.setValue("myvalue");
       
        Encoder encoder = new Encoder(new WFSConfiguration());
View Full Code Here


    public void encodeDelete() throws IOException, SAXException, TransformerException, XpathException{
        WfsFactory wfsfac = WfsFactory.eINSTANCE;
        FilterFactory2 filterfac = CommonFactoryFinder.getFilterFactory2();
               
        DeleteElementType delete = wfsfac.createDeleteElementType();
        delete.setFilter(filterfac.id( filterfac.featureId("someid")));
       
        Encoder encoder = new Encoder(new WFSConfiguration());
        //System.out.println(encoder.encodeAsString(delete, WFS.Delete));
        Document doc = encoder.encodeAsDOM(delete, WFS.Delete);
        XMLAssert.assertXpathEvaluatesTo("someid", "//wfs:Delete/ogc:Filter/ogc:FeatureId/@fid", doc);       
View Full Code Here

        UpdateElementType update = wfsfac.createUpdateElementType();
        PropertyType propertyType = wfsfac.createPropertyType();
        propertyType.setName(new QName("http://my.namespace","myproperty","mn"));
        update.getProperty().add(propertyType);
        update.setTypeName(new QName("http://my.namespace","mytypename","mn"));
        update.setFilter(filterfac.id( filterfac.featureId("someid")));
       
        //try with string
        propertyType.setValue("myvalue");
       
        Encoder encoder = new Encoder(new WFSConfiguration());
View Full Code Here

    public void encodeDelete() throws IOException, SAXException, TransformerException, XpathException{
        WfsFactory wfsfac = WfsFactory.eINSTANCE;
        FilterFactory2 filterfac = CommonFactoryFinder.getFilterFactory2();
               
        DeleteElementType delete = wfsfac.createDeleteElementType();
        delete.setFilter(filterfac.id( filterfac.featureId("someid")));
       
        Encoder encoder = new Encoder(new WFSConfiguration());
        //System.out.println(encoder.encodeAsString(delete, WFS.Delete));
        Document doc = encoder.encodeAsDOM(delete, WFS.Delete);
        XMLAssert.assertXpathEvaluatesTo("someid", "//wfs:Delete/ogc:Filter/ogc:FeatureId/@fid", doc);       
View Full Code Here

        SimpleFeatureStore roadFromClient2 = (SimpleFeatureStore) store.getFeatureSource("road");
        Transaction transaction2 = new DefaultTransaction("Transaction Used by Client 2");
        roadFromClient2.setTransaction( transaction2 );

        FilterFactory2 ff = (FilterFactory2) CommonFactoryFinder.getFilterFactory(null);
        Filter selectFid1 = ff.id( Collections.singleton( ff.featureId("fid1") ));
      
        // Before we edit everything should be the same
        assertEquals( "auto before", 5, roadAuto.getFeatures().size() );
        assertEquals( "client 1 before", 5, roadFromClient1.getFeatures().size() );
        assertEquals( "client 2 before", 5, roadFromClient2.getFeatures().size() );
View Full Code Here

        SimpleFeatureCollection features = road.getFeatures();
        assertFalse( features.isEmpty() );
       
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
       
        SimpleFeatureCollection select = road.getFeatures( ff.id( ff.featureId("fid1")));
        SimpleFeatureIterator iterator = select.features();
        SimpleFeature feature1 = iterator.next();
        assertNotNull( feature1 );
        iterator.close();
View Full Code Here

        SimpleFeatureIterator iterator = select.features();
        SimpleFeature feature1 = iterator.next();
        assertNotNull( feature1 );
        iterator.close();

        select = road.getFeatures( ff.id( ff.featureId("fid2")));
        iterator = select.features();
        SimpleFeature feature2 = iterator.next();
        assertNotNull( feature2 );
        iterator.close();
       
View Full Code Here

                Set featureIds = new HashSet();

                FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints());
                for (Iterator f = fids.iterator(); f.hasNext();) {
                    featureIds.add(ff.featureId((String) f.next()));
                }

                Id modified = ff.id(featureIds);

                SimpleFeatureCollection changed = store.getFeatures(modified);
View Full Code Here

                FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints());
                for (Iterator<FeatureId> f = fids.iterator(); f.hasNext();) {
                    // create new FeatureIds without any possible version information in order to
                    // query for the latest version
                    featureIds.add(ff.featureId(f.next().getID()));
                }

                Id modified = ff.id(featureIds);

                SimpleFeatureCollection changed = store.getFeatures(modified);
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.