Package org.opengis.parameter

Examples of org.opengis.parameter.InvalidParameterNameException


                if (name.equals(descriptor.getName())) {
                    throw new IllegalArgumentException(Errors.format(
                            Errors.Keys.MismatchedParameterDescriptor_1, name));
                }
            }
            throw new InvalidParameterNameException(Errors.format(
                    Errors.Keys.ParameterNotFound_2, descriptor.getName(), name), name.getCode());
        }
    }
View Full Code Here


        for (int i=0; i<parameters.length; i++) {
            ArgumentChecks.ensureNonNullElement("parameters", i, parameters);
            final String name = parameters[i].getName().getCode();
            for (int j=0; j<i; j++) {
                if (IdentifiedObjects.isHeuristicMatchForName(parameters[j], name)) {
                    throw new InvalidParameterNameException(Errors.getResources(properties).getString(
                            Errors.Keys.DuplicatedParameterName_4, parameters[j].getName().getCode(), j, name, i),
                            name);
                }
            }
        }
View Full Code Here

                    indices = nameToIndices(name);
                } catch (IllegalArgumentException e) {
                    cause = e;
                }
                if (indices == null) {
                    throw (InvalidParameterNameException) new InvalidParameterNameException(Errors.format(
                                Errors.Keys.UnexpectedParameter_1, name), name).initCause(cause);
                }
                matrix.setElement(indices[0], indices[1], ((ParameterValue<?>) param).doubleValue());
            }
        }
View Full Code Here

                    final ParameterValueGroup groups = (ParameterValueGroup) descriptor.createValue();
                    copy((ParameterValueGroup) value, groups);
                    values.groups(name).add(groups);
                    continue;
                } else {
                    throw new InvalidParameterNameException(Errors.format(
                              ErrorKeys.UNEXPECTED_PARAMETER_$1, name), name);
                }
            }
            /*
             * Single parameter - copy the value, with special care for value with units.
             */
            final ParameterValue<?> source = (ParameterValue) value;
            final ParameterValue<?> target;
            try {
                target = copy.parameter(name);
            } catch (ParameterNotFoundException cause) {
                final InvalidParameterNameException exception =
                      new InvalidParameterNameException(Errors.format(
                          ErrorKeys.UNEXPECTED_PARAMETER_$1, name), name);
                exception.initCause(cause);
                throw exception;
            }
            final Object  v    = source.getValue();
            final Unit<?> unit = source.getUnit();
            if (unit == null) {
View Full Code Here

            throws InvalidParameterNameException
    {
        if (value != null) try {
            parameters.parameter(name).setValue(value);
        } catch (ParameterNotFoundException cause) {
            final InvalidParameterNameException exception = new InvalidParameterNameException(
                    Errors.format(ErrorKeys.UNKNOW_PARAMETER_NAME_$1, name), name);
            exception.initCause(cause);
            throw exception;
        }
    }
View Full Code Here

            final String name = values[j].getDescriptor().getName().getCode().trim();
            for (int i=0; i<values.length; i++) {
                if (i != j) {
                    final ParameterDescriptor d = (ParameterDescriptor) values[i].getDescriptor();
                    if (AbstractIdentifiedObject.nameMatches(d, name)) {
                        throw new InvalidParameterNameException(Errors.format(
                                ErrorKeys.PARAMETER_NAME_CLASH_$4,
                                d.getName().getCode(), j, name, i), name);
                    }
                }
            }
View Full Code Here

                        cause = exception;
                    } catch (IndexOutOfBoundsException exception) {
                        cause = exception;
                    }
                }
                final InvalidParameterNameException exception;
                exception = new InvalidParameterNameException(Errors.format(
                                ErrorKeys.UNEXPECTED_PARAMETER_$1, name), name);
                if (cause != null) {
                    exception.initCause(cause);
                }
                throw exception;
            }
        }
        return matrix;
View Full Code Here

        for (int i=0; i<parameters.length; i++) {
            final String name = parameters[i].getName().getCode();
            for (int j=0; j<parameters.length; j++) {
                if (i != j) {
                    if (nameMatches(parameters[j], name)) {
                        throw new InvalidParameterNameException(Errors.format(
                            ErrorKeys.PARAMETER_NAME_CLASH_$4,
                            parameters[j].getName().getCode(), j, name, i), name);
                    }
                }
            }
View Full Code Here

                new LinkedHashMap<String,ParameterDescriptor>();
        if (extension != null) {
            for (final ParameterDescriptor d : extension) {
                final String name = d.getName().getCode().trim().toLowerCase();
                if (replacements.put(name, d) != null) {
                    throw new InvalidParameterNameException(Errors.format(
                            ErrorKeys.DUPLICATED_VALUES_$1, name), name);
                }
            }
        }
        /*
 
View Full Code Here

            if (parameter instanceof ParameterValue) {
                value = ((ParameterValue) parameter).getValue();
            } else {
                value = "(group)";
            }
            throw new InvalidParameterNameException(Errors.format(
                      ErrorKeys.ILLEGAL_ARGUMENT_$2, name, value), name);
        }
        final int max = type.getMaximumOccurs();
        if (max == 1) {
            /*
 
View Full Code Here

TOP

Related Classes of org.opengis.parameter.InvalidParameterNameException

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.