Package org.geotools.data.store

Examples of org.geotools.data.store.ContentFeatureStore


        JSONObject italy = (JSONObject) data.get(0);
        FeatureJSON json = new FeatureJSON();
        json.setFeatureType(CouchDBUtils.createFeatureType(italy, "countries"));
        Feature feature = json.readFeature(italy.toString());
       
        ContentFeatureStore featureStore = (ContentFeatureStore) store.getFeatureSource("gttestdb.countries");
        featureStore.addFeatures(Collections.singleton(feature));
       
        // single add case
        ContentFeatureCollection features = featureStore.getFeatures();
        assertEquals(2,features.size());
       
        // double add (we can add the same features repeatedly at the moment
        // since the id is opaque to the feature
        featureStore.addFeatures(Arrays.asList(feature,feature));
        assertEquals(4,features.size());

    }
View Full Code Here


    public final FeatureWriter<SimpleFeatureType, SimpleFeature> getEFeatureWriterUpdate(String eType, Filter filter,
            Transaction tx) throws IOException {
       
        tx = ensureTransaction(tx);
        filter = ensureFilter(filter);
        ContentFeatureStore featureStore = ensureFeatureStore(eType,tx);
        return featureStore.getWriter( filter , WRITER_UPDATE );
    }
View Full Code Here

TOP

Related Classes of org.geotools.data.store.ContentFeatureStore

Copyright © 2018 www.massapicom. 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.