Examples of addVirtualTable()


Examples of org.geotools.jdbc.JDBCDataStore.addVirtualTable()

            } while (Arrays.asList(ds.getTypeNames()).contains(vtName));

            // try adding the vt and see if that works
            VirtualTable vt = new VirtualTable(vtName, sql);
            paramProvider.updateVirtualTable(vt);
            ds.addVirtualTable(vt);
            return guessFeatureType(ds, vt.getName(), guessGeometrySrid);
        } finally {
            if(vtName != null) {
                ds.removeVirtualTable(vtName);
            }
View Full Code Here

Examples of org.geotools.jdbc.JDBCDataStore.addVirtualTable()

            do {
                vtName = UUID.randomUUID().toString();
            } while (Arrays.asList(ds.getTypeNames()).contains(vtName));

            // try adding the vt and see if that works
            ds.addVirtualTable(new VirtualTable(vtName, vt));
            return ds.getSchema(vtName);
        } finally {
            if(vtName != null) {
                ds.removeVirtualTable(vtName);
            }
View Full Code Here

Examples of org.geotools.jdbc.JDBCDataStore.addVirtualTable()

            // try adding the vt and see if that works
            VirtualTable vt = new VirtualTable(vtName, virtualTable);
            // hide the primary key definitions or we'll loose some columns
            vt.setPrimaryKeyColumns(Collections.EMPTY_LIST);
            ds.addVirtualTable(vt);
            return guessFeatureType(ds, vt.getName(), guessGeometrySrid);
        } finally {
            if(vtName != null) {
                ds.removeVirtualTable(name);
            }
View Full Code Here

Examples of org.geotools.jdbc.JDBCDataStore.addVirtualTable()

                            do {
                                vtName = UUID.randomUUID().toString();
                            } while (Arrays.asList(typeNames).contains(vtName));
   
                            // try adding the vt and see if that works
                            jstore.addVirtualTable(new VirtualTable(vtName, vt));
                            ft = jstore.getSchema(vtName);
                        } else {
                            vtName = vt.getName();
                            jstore.addVirtualTable(vt);
                            ft = jstore.getSchema(vt.getName());
View Full Code Here

Examples of org.geotools.jdbc.JDBCDataStore.addVirtualTable()

                            // try adding the vt and see if that works
                            jstore.addVirtualTable(new VirtualTable(vtName, vt));
                            ft = jstore.getSchema(vtName);
                        } else {
                            vtName = vt.getName();
                            jstore.addVirtualTable(vt);
                            ft = jstore.getSchema(vt.getName());
                        }
                    } else {
                        ft = dataAccess.getSchema(info.getQualifiedNativeName());
                    }
View Full Code Here

Examples of org.geotools.jdbc.JDBCDataStore.addVirtualTable()

        // sql view handling
        if(dataStore instanceof JDBCDataStore && info.getMetadata() != null &&
                info.getMetadata().containsKey(FeatureTypeInfo.JDBC_VIRTUAL_TABLE)) {
            VirtualTable vt = (VirtualTable) info.getMetadata().get(FeatureTypeInfo.JDBC_VIRTUAL_TABLE);
            JDBCDataStore jstore = (JDBCDataStore) dataStore;
            jstore.addVirtualTable(vt);
        }
               
        //
        // aliasing and type mapping
        //
View Full Code Here

Examples of org.geotools.jdbc.JDBCDataStore.addVirtualTable()

    protected void onSave() {
        try {
            VirtualTable vt = buildVirtualTable();
            DataStoreInfo dsInfo = getCatalog().getStore(storeId, DataStoreInfo.class);
            JDBCDataStore ds = (JDBCDataStore) dsInfo.getDataStore(null);
            ds.addVirtualTable(vt);

            CatalogBuilder builder = new CatalogBuilder(getCatalog());
            builder.setStore(dsInfo);
            FeatureTypeInfo fti = builder.buildFeatureType(ds.getFeatureSource(vt.getName()));
            fti.getMetadata().put(FeatureTypeInfo.JDBC_VIRTUAL_TABLE, vt);
View Full Code Here

Examples of org.geotools.jdbc.JDBCDataStore.addVirtualTable()

        JDBCDataStore jds = (JDBCDataStore) ds.getDataStore(null);
        VirtualTable vt = new VirtualTable("pgeo_view", "select \"name\", \"pointProperty\" from \"pgeo\" where \"booleanProperty\" = %bool% and \"name\" = '%name%'");
        vt.addParameter(new VirtualTableParameter("bool", "true"));
        vt.addParameter(new VirtualTableParameter("name", "name-f001"));
        vt.addGeometryMetadatata("pointProperty", Point.class, 4326);
        jds.addVirtualTable(vt);

        FeatureTypeInfo vft = cb.buildFeatureType(jds.getFeatureSource(vt.getName()));
        vft.getMetadata().put(FeatureTypeInfo.JDBC_VIRTUAL_TABLE, vt);
        cat.add(vft);
    }
View Full Code Here

Examples of org.geotools.jdbc.JDBCDataStore.addVirtualTable()

    protected void onSave() {
        try {
            VirtualTable vt = buildVirtualTable();
            DataStoreInfo dsInfo = getCatalog().getStore(storeId, DataStoreInfo.class);
            JDBCDataStore ds = (JDBCDataStore) dsInfo.getDataStore(null);
            ds.addVirtualTable(vt);

            CatalogBuilder builder = new CatalogBuilder(getCatalog());
            builder.setStore(dsInfo);
            FeatureTypeInfo fti = builder.buildFeatureType(ds.getFeatureSource(vt.getName()));
            fti.getMetadata().put(FeatureTypeInfo.JDBC_VIRTUAL_TABLE, vt);
View Full Code Here

Examples of org.geotools.jdbc.JDBCDataStore.addVirtualTable()

            } while (Arrays.asList(ds.getTypeNames()).contains(vtName));

            // try adding the vt and see if that works
            VirtualTable vt = new VirtualTable(vtName, sql);
            paramProvider.updateVirtualTable(vt);
            ds.addVirtualTable(vt);
            return guessFeatureType(ds, vt.getName(), guessGeometrySrid);
        } finally {
            if(vtName != null) {
                ds.removeVirtualTable(vtName);
            }
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.