Package org.locationtech.geogig.cli

Examples of org.locationtech.geogig.cli.InvalidParameterException


                // TODO: This could probably be more descriptive.
                throw new CommandFailedException("The config location is invalid", e);
            case CANNOT_WRITE:
                throw new CommandFailedException("Cannot write to the config", e);
            case SECTION_OR_NAME_NOT_PROVIDED:
                throw new InvalidParameterException("No section or name was provided", e);
            case SECTION_OR_KEY_INVALID:
                throw new InvalidParameterException("The section or key is invalid", e);
            case OPTION_DOES_NOT_EXIST:
                throw new InvalidParameterException("Tried to unset an option that does not exist",
                        e);
            case MULTIPLE_OPTIONS_MATCH:
                throw new InvalidParameterException(
                        "Tried to unset/set an option for which multiple lines match", e);
            case INVALID_REGEXP:
                throw new InvalidParameterException("Tried to use an invalid regexp", e);
            case USERHOME_NOT_SET:
                throw new InvalidParameterException(
                        "Used --global option without $HOME being properly set", e);
            case TOO_MANY_ACTIONS:
                throw new InvalidParameterException("Tried to use more than one action at a time",
                        e);
            case MISSING_SECTION:
                throw new InvalidParameterException(
                        "Could not find a section with the name provided", e);
            case TOO_MANY_ARGS:
                throw new InvalidParameterException("Too many arguments provided.", e);
            }
        } finally {
            if (closeIt) {
                geogig.close();
            }
View Full Code Here


        if (revObject.isPresent() && revObject.get() instanceof RevFeatureType) {
            RevFeatureType revFeatureType = (RevFeatureType) revObject.get();
            if (revFeatureType.type() instanceof SimpleFeatureType) {
                return (SimpleFeatureType) revFeatureType.type();
            } else {
                throw new InvalidParameterException(
                        "Cannot find feature type for the specified path");
            }
        } else {
            throw new InvalidParameterException("Cannot find feature type for the specified path");
        }

    }
View Full Code Here

                checkParameter(!envelope.isNull(), "Provided envelope is nil");
                return envelope;
            } catch (NumberFormatException e) {
                String message = String.format(
                        "One or more bbox coordinate can't be parsed to double: '%s'", bbox);
                throw new InvalidParameterException(message, e);
            }
        }
        return null;
    }
View Full Code Here

        if (revObject.isPresent() && revObject.get() instanceof RevFeatureType) {
            RevFeatureType revFeatureType = (RevFeatureType) revObject.get();
            if (revFeatureType.type() instanceof SimpleFeatureType) {
                return (SimpleFeatureType) revFeatureType.type();
            } else {
                throw new InvalidParameterException(
                        "Cannot find feature type for the specified path");
            }
        } else {
            throw new InvalidParameterException("Cannot find feature type for the specified path");
        }

    }
View Full Code Here

        if (revObject.isPresent() && revObject.get() instanceof RevFeatureType) {
            RevFeatureType revFeatureType = (RevFeatureType) revObject.get();
            if (revFeatureType.type() instanceof SimpleFeatureType) {
                return (SimpleFeatureType) revFeatureType.type();
            } else {
                throw new InvalidParameterException(
                        "Cannot find feature type for the specified path");
            }
        } else {
            throw new InvalidParameterException("Cannot find feature type for the specified path");
        }

    }
View Full Code Here

            }
            if (fidAttribute != null) {
                AttributeDescriptor attrib = dataStore.getSchema(dataStore.getNames().get(0))
                        .getDescriptor(fidAttribute);
                if (attrib == null) {
                    throw new InvalidParameterException(
                            "The specified attribute does not exist in the selected GeoJSON file");
                }
            }
            if (geomNameAuto) {
                String destPath = destTable;
View Full Code Here

            }
            if (fidAttribute != null) {
                AttributeDescriptor attrib = dataStore.getSchema(dataStore.getNames().get(0))
                        .getDescriptor(fidAttribute);
                if (attrib == null) {
                    throw new InvalidParameterException(
                            "The specified attribute does not exist in the selected shapefile");
                }
            }

            try {
View Full Code Here

        if (revObject.isPresent() && revObject.get() instanceof RevFeatureType) {
            RevFeatureType revFeatureType = (RevFeatureType) revObject.get();
            if (revFeatureType.type() instanceof SimpleFeatureType) {
                return (SimpleFeatureType) revFeatureType.type();
            } else {
                throw new InvalidParameterException(
                        "Cannot find feature type for the specified path");
            }
        } else {
            throw new InvalidParameterException("Cannot find feature type for the specified path");
        }
    }
View Full Code Here

                }
            }
        } catch (BlameException e) {
            switch (e.statusCode) {
            case FEATURE_NOT_FOUND:
                throw new InvalidParameterException("The supplied path does not exist", e);
            case PATH_NOT_FEATURE:
                throw new InvalidParameterException(
                        "The supplied path does not resolve to a feature", e);

            }
        }
    }
View Full Code Here

        if (revObject.isPresent() && revObject.get() instanceof RevFeatureType) {
            RevFeatureType revFeatureType = (RevFeatureType) revObject.get();
            if (revFeatureType.type() instanceof SimpleFeatureType) {
                return (SimpleFeatureType) revFeatureType.type();
            } else {
                throw new InvalidParameterException(
                        "Cannot find feature type for the specified path");
            }
        } else {
            throw new InvalidParameterException("Cannot find feature type for the specified path");
        }

    }
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.cli.InvalidParameterException

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.