Examples of DataSourceException


Examples of org.geotools.data.DataSourceException

            FeatureCollection<SimpleFeatureType, SimpleFeature> fc;
            fc = versioningSource.getVersionedFeatures(newQuery);

            return applyProjectionPolicies(targetCRS, fc);
        } catch (Exception e) {
            throw new DataSourceException(e);
        }
    }
View Full Code Here

Examples of org.geotools.data.DataSourceException

        connFact.setLogin(dbUser, dbPasswd);
        ConnectionPool pool = null;
        try {
            pool = connFact.getConnectionPool();
        } catch (SQLException e) {
            throw new DataSourceException("Could not create connection", e);
        }

        LineMergerPostgisDataStore dataStore = null;
        if (dbSchema == null && namespace == null) {
            dataStore = new LineMergerPostgisDataStore(pool, params);
View Full Code Here

Examples of org.geotools.data.DataSourceException

            SimpleFeatureType schema = (SimpleFeatureType) getFeatureType(info);
            try {
                if (!CRS.equalsIgnoreMetadata(resultCRS, schema.getCoordinateReferenceSystem()))
                    schema = FeatureTypes.transform(schema, resultCRS);
            } catch (Exception e) {
                throw new DataSourceException(
                        "Problem forcing CRS onto feature type", e);
            }

            //
            // versioning
            //
            try {
                // only support versioning if on classpath
                if (VERSIONING_FS != null && GS_VERSIONING_FS != null && VERSIONING_FS.isAssignableFrom( fs.getClass() ) ) {
                    //class implements versioning, reflectively create the versioning wrapper
                    try {
                    Method m = GS_VERSIONING_FS.getMethod( "create", VERSIONING_FS,
                        SimpleFeatureType.class, Filter.class, CoordinateReferenceSystem.class, int.class );
                    return (FeatureSource) m.invoke(null, fs, schema, info.getFilter(),
                        resultCRS, info.getProjectionPolicy().getCode());
                    }
                    catch( Exception e ) {
                        throw new DataSourceException(
                                "Creation of a versioning wrapper failed", e);
                    }
                }
            } catch( ClassCastException e ) {
                //fall through
View Full Code Here

Examples of org.geotools.data.DataSourceException

     */
    public int lockFeatures(Query query) throws IOException {
        if (source instanceof FeatureLocking) {
            return ((FeatureLocking<SimpleFeatureType, SimpleFeature>) source).lockFeatures(query);
        } else {
            throw new DataSourceException("FeatureTypeConfig does not supports locking");
        }
    }
View Full Code Here

Examples of org.geotools.data.DataSourceException

                defQuery.setSortBy(query.getSortBy());
            }

            return defQuery;
        } catch (Exception ex) {
            throw new DataSourceException(
                "Could not restrict the query to the definition criteria: " + ex.getMessage(), ex);
        }
    }
View Full Code Here

Examples of org.geotools.data.DataSourceException

        try {
            if (definitionQuery != Filter.INCLUDE) {
                newFilter = ff.and(definitionQuery, filter);
            }
        } catch (Exception ex) {
            throw new DataSourceException("Can't create the definition filter", ex);
        }

        return newFilter;
    }
View Full Code Here

Examples of org.geotools.data.DataSourceException

        try {
            //this is the raw "unprojected" feature collection
            FeatureCollection<SimpleFeatureType, SimpleFeature> fc = source.getFeatures(newQuery);
            return applyProjectionPolicies(targetCRS, fc);
        } catch (Exception e) {
            throw new DataSourceException(e);
        }
    }
View Full Code Here

Examples of org.geotools.data.DataSourceException

           
            DefaultQuery reprojectedQuery = new DefaultQuery(query);
            reprojectedQuery.setFilter(reprojectedFilter);
            return reprojectedQuery;
        } catch(Exception e) {
            throw new DataSourceException("Had troubles handling filter reprojection...", e);
        }
    }
View Full Code Here

Examples of org.jfree.report.DataSourceException

            }
            return ret;
        }
        catch (com.sun.star.report.DataSourceException e)
        {
            throw new DataSourceException("Failed to move cursor", e);
        }
    }
View Full Code Here

Examples of org.jfree.report.DataSourceException

        {
            dataSource.close();
        }
        catch (com.sun.star.report.DataSourceException e)
        {
            throw new DataSourceException("Failed to close datasource", e);
        }
    }
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.