Package org.geotools.data

Examples of org.geotools.data.DataSourceException


    /**
     *
     */
    public String readFID() throws IOException {
        if (this.currentFid == -1) {
            throw new DataSourceException("The feature id was not fetched");
        }
        this.fidPrefix.setLength(this.fidPrefixLen);
        this.fidPrefix.append(this.currentFid);

        return this.fidPrefix.toString();
View Full Code Here


                    } else if (rowIdStr.equalsIgnoreCase("USER")) {
                        rowIdType = SeRegistration.SE_REGISTRATION_ROW_ID_COLUMN_TYPE_USER;
                    } else if (rowIdStr.equalsIgnoreCase("SDE")) {
                        rowIdType = SeRegistration.SE_REGISTRATION_ROW_ID_COLUMN_TYPE_SDE;
                    } else {
                        throw new DataSourceException(
                                "createSchema hint 'rowid.column.type' must be one of 'NONE', 'USER' or 'SDE'");
                    }
                }
                if (hints.get("rowid.column.name") instanceof String) {
                    rowIdColumn = (String) hints.get("rowid.column.name");
View Full Code Here

        assert session != null;
        assert listenerManager != null;
        assert versionHandler != null;

        if (!(fidReader instanceof FIDReader.SdeManagedFidReader || fidReader instanceof FIDReader.UserManagedFidReader)) {
            throw new DataSourceException("fid reader is not user nor sde managed: " + fidReader);
        }

        this.fidReader = fidReader;
        this.featureType = featureType;
        this.filteredContent = filteredContent;
View Full Code Here

                        } catch (IOException e1) {
                            LOGGER.log(Level.SEVERE, "Unrecoverable error rolling "
                                    + "back delete transaction", e);
                        }
                    }
                    throw new DataSourceException("Error deleting feature with id:" + featureId, e);
                } finally {
                    if (seDelete != null) {
                        try {
                            seDelete.close();
                        } catch (SeException e) {
View Full Code Here

                    if (e instanceof SeException) {
                        throw (SeException) e;
                    } else if (e instanceof IOException) {
                        throw (IOException) e;
                    }
                    throw new DataSourceException(e);
                }
                insertStream.close();
                return newId;
            }
        };
View Full Code Here

                        TopologyValidationError validationError = validator.getValidationError();
                        String validationErrorMessage = validationError.getMessage();
                        Coordinate coordinate = validationError.getCoordinate();
                        String errorMessage = "Topology validation error at or near point "
                                + coordinate + ": " + validationErrorMessage;
                        throw new DataSourceException("Invalid geometry passed for " + attName
                                + "\n Geomerty: " + geom + "\n" + errorMessage);
                    }
                    ArcSDEGeometryBuilder geometryBuilder;
                    geometryBuilder = ArcSDEGeometryBuilder.builderFor(geom.getClass());
                    SeShape shape = geometryBuilder.constructShape(geom, coordRef);
View Full Code Here

        Filter filter;
        try {
            filter = CQL.toFilter(ecqlPredicate);
        } catch (CQLException e) {
            throw new DataSourceException(e);
        }

        store.removeFeatures(filter);
    }
View Full Code Here

            // create the resulting feature type for the real attributes to
            // retrieve
            SimpleFeatureType querySchema = DataUtilities.createSubType(fullSchema, attNames);
            return querySchema;
        } catch (SchemaException ex) {
            throw new DataSourceException(
                    "Some requested attributes do not match the table schema: " + ex.getMessage(),
                    ex);
        }
    }
View Full Code Here

            LOGGER.log(Level.WARNING, msg, e);
            throw e;
        } catch (Exception e) {
            close();
            LOGGER.log(Level.SEVERE, "fetching row: " + e.getMessage(), e);
            throw new DataSourceException("fetching row: " + e.getMessage(), e);
        }

        if (currentRow != null) {
            currentRow.setPreviousValues(this.previousRowValues);
            previousRowValues = currentRow.getAll();
View Full Code Here

                    try {
                        whereClause = sqlEncoder.encodeToString(sqlFilter);
                    } catch (FilterToSQLException sqle) {
                        String message = "Geometry encoder error: " + sqle.getMessage();
                        throw new DataSourceException(message, sqle);
                    }
                    LOGGER.fine("ArcSDE where clause '" + whereClause + "'");

                    this.sdeSqlConstruct.setWhere(whereClause);
                }
View Full Code Here

TOP

Related Classes of org.geotools.data.DataSourceException

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.