Package org.geotools.data

Examples of org.geotools.data.DataStore.createSchema()


        store.createSchema(tb.buildFeatureType());
       
        tb.init((SimpleFeatureType) fs2.getSchema());
        tb.add("num", Integer.class);
        tb.remove("boundedBy");
        store.createSchema(tb.buildFeatureType());
       
        CatalogBuilder cb = new CatalogBuilder(cat);
        cb.setStore(ds);
       
        FeatureStore fs = (FeatureStore) store.getFeatureSource("Fifteen");
View Full Code Here


                }
   
                //apply the feature type transform
                featureType = tx.inline(task, dataStore, featureType);
   
                dataStore.createSchema(featureType);
            } else {
                // @todo what to do if featureType transform is present?
               
                // @todo implement me - need to specify attribute used for id
                if (updateMode == UpdateMode.UPDATE) {
View Full Code Here

        DataStore store = (DataStore) ds.getDataStore(null);
        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
       
        tb.init((SimpleFeatureType) fs1.getSchema());
        //tb.remove("boundedBy");
        store.createSchema(tb.buildFeatureType());
       
        tb.init((SimpleFeatureType) fs2.getSchema());
        //tb.remove("boundedBy");
        store.createSchema(tb.buildFeatureType());
       
View Full Code Here

        //tb.remove("boundedBy");
        store.createSchema(tb.buildFeatureType());
       
        tb.init((SimpleFeatureType) fs2.getSchema());
        //tb.remove("boundedBy");
        store.createSchema(tb.buildFeatureType());
       
        tb.init((SimpleFeatureType) fs3.getSchema());
        tb.remove("surfaceProperty");
        tb.remove("curveProperty");
        tb.remove("uriProperty");
View Full Code Here

       
        tb.init((SimpleFeatureType) fs3.getSchema());
        tb.remove("surfaceProperty");
        tb.remove("curveProperty");
        tb.remove("uriProperty");
        store.createSchema(tb.buildFeatureType());
       
        CatalogBuilder cb = new CatalogBuilder(cat);
        cb.setStore(ds);
       
        FeatureStore fs = (FeatureStore) store.getFeatureSource("Forests");
View Full Code Here

        tb.setName("TimeFeature");
        tb.add("name", String.class);
        tb.add("dateTime", Date.class);
       
        SimpleFeatureType timeFeatureType = tb.buildFeatureType();
        store.createSchema(timeFeatureType);
       
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");

        DefaultFeatureCollection features = new DefaultFeatureCollection(null, null);
        SimpleFeatureBuilder fb = new SimpleFeatureBuilder(timeFeatureType);
View Full Code Here

            tb.setName(name);
            sourceType = tb.buildFeatureType();
        }

        // create the schema
        ds.createSchema(sourceType);

        // try to get the target feature type (might have slightly different
        // name and structure)
        targetType = ds.getSchema(sourceType.getTypeName());
        if (targetType == null) {
View Full Code Here

       SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
       tb.setName("bar");
       tb.add("name", String.class);
       tb.add("geom", Point.class);
      
       store.createSchema(tb.buildFeatureType());
      
       CatalogBuilder cb = new CatalogBuilder(cat);
       cb.setStore(ds);

       SimpleFeatureStore fs = (SimpleFeatureStore) store.getFeatureSource("bar");
View Full Code Here

       
        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
        tb.setName( "widgetsNG" );
        tb.add( "name", String.class );
       
        ds.createSchema( tb.buildFeatureType() );
       
        FeatureWriter fw = ds.getFeatureWriterAppend( "widgetsNG", Transaction.AUTO_COMMIT );
        fw.hasNext();
        SimpleFeature sf = (SimpleFeature) fw.next();
        sf.setAttribute( "name", "one");
View Full Code Here

                        LOGGER.info(featureTypeName + " does not exist in data store " + datastore +
                            ". Attempting to create it");
                       
                        //schema does not exist, create it by first creating an instance of
                        // the source datastore and copying over its schema
                        ds.createSchema(source.getSchema(featureTypeName));
                        featureType = source.getSchema(featureTypeName);
                    }
   
                    FeatureSource featureSource = ds.getFeatureSource(featureTypeName);
                    if (!(featureSource instanceof FeatureStore)) {
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.