Package org.geotools.data.h2

Examples of org.geotools.data.h2.H2DataStoreFactory


        HashMap params = new HashMap();
        params.put( JDBCDataStoreFactory.NAMESPACE.key, MockData.DEFAULT_URI);
        params.put( JDBCDataStoreFactory.DATABASE.key, "acme");
        params.put( JDBCDataStoreFactory.DBTYPE.key, "h2");
       
        H2DataStoreFactory fac =  new H2DataStoreFactory();
        fac.setBaseDirectory( getTestData().getDataDirectoryRoot() );
       
        JDBCDataStore ds = fac.createDataStore(params);
        try {
            if ( ds.getSchema("widgets") != null ) {
                return;
            }
        }
View Full Code Here


            Map<String,Serializable> map = Maps.newHashMap();
            map.put(H2DataStoreFactory.DBTYPE.key, "h2");
            map.put(H2DataStoreFactory.DATABASE.key, new File(dir, name +".db").getPath());
            map.put(H2DataStoreFactory.NAMESPACE.key, namespace.getURI());

            return dataStore(name, map, new H2DataStoreFactory());
        }
View Full Code Here

* @source $URL$
*/
public class H2JNDIDataStoreFactory extends JDBCJNDIDataStoreFactory {

    public H2JNDIDataStoreFactory() {
        super(new H2DataStoreFactory());
    }
View Full Code Here

    }

    void setUpMock() throws Exception {
        DeleteDbFiles.execute("target", "acme", true);
       
        H2DataStoreFactory fac = new H2DataStoreFactory();
        HashMap params = new HashMap();
   
        params.put(H2DataStoreFactory.DATABASE.key, "target/acme");
        params.put(H2DataStoreFactory.DBTYPE.key, "h2");
       
        DataStore ds = fac.createDataStore(params);
       
        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
        tb.setName("widgets");
        tb.add("type", String.class);
        tb.add("price", Double.class);
View Full Code Here

    }

    void setUpMock() throws Exception {
        DeleteDbFiles.execute("target", "acme", true);
       
        H2DataStoreFactory fac = new H2DataStoreFactory();
        HashMap params = new HashMap();
   
        params.put(H2DataStoreFactory.DATABASE.key, "target/acme");
        params.put(H2DataStoreFactory.DBTYPE.key, "h2");
       
        DataStore ds = fac.createDataStore(params);
       
        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
        tb.setName("widgets");
        tb.add("type", String.class);
        tb.add("price", Double.class);
View Full Code Here

    }

    void setUpMock() throws Exception {
        DeleteDbFiles.execute("target", "acme", true);
       
        H2DataStoreFactory fac = new H2DataStoreFactory();
        HashMap params = new HashMap();
   
        params.put(H2DataStoreFactory.DATABASE.key, "target/acme");
        params.put(H2DataStoreFactory.DBTYPE.key, "h2");
       
        DataStore ds = fac.createDataStore(params);
       
        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
        tb.setName("widgets");
        tb.add("type", String.class);
        tb.add("price", Double.class);
View Full Code Here

        HashMap params = new HashMap();
        params.put( JDBCDataStoreFactory.NAMESPACE.key, MockData.DEFAULT_URI);
        params.put( JDBCDataStoreFactory.DATABASE.key, databasePath());
        params.put( JDBCDataStoreFactory.DBTYPE.key, "h2");
       
        H2DataStoreFactory fac =  new H2DataStoreFactory();
       
        JDBCDataStore ds = fac.createDataStore(params);

        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
        tb.setName( "widgets" );
        tb.setSRS( "EPSG:4326");
        tb.add( "g", Point.class );
View Full Code Here

        HashMap params = new HashMap();
        params.put( JDBCDataStoreFactory.NAMESPACE.key, MockData.DEFAULT_URI);
        params.put( JDBCDataStoreFactory.DATABASE.key, "acme");
        params.put( JDBCDataStoreFactory.DBTYPE.key, "h2");
       
        H2DataStoreFactory fac =  new H2DataStoreFactory();
        fac.setBaseDirectory( getTestData().getDataDirectoryRoot() );
       
        JDBCDataStore ds = fac.createDataStore(params);
        try {
            if ( ds.getSchema("widgets") != null ) {
                return;
            }
        }
View Full Code Here

*/
public class H2DataStoreTest extends JDBCDataStoreTest {

    @Override
    protected JDBCTestSetup createTestSetup() {
        return new JDBCJNDITestSetup(new H2TestSetup());
    }
View Full Code Here

TOP

Related Classes of org.geotools.data.h2.H2DataStoreFactory

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.