Package org.opengis.parameter

Examples of org.opengis.parameter.InvalidParameterCardinalityException


                 * mapping was using a lower case name version of its original name, so we can discard that lower
                 * case version (the original name is still present in the map).
                 */
                final String oldName = nameFunction.apply(old);
                if (Objects.equals(name, oldName)) {
                    throw new InvalidParameterCardinalityException(Errors.format(Errors.Keys.ValueAlreadyDefined_1, name), name);
                }
            }
            /*
             * Add lower-cases versions of the above element names, only if that name is not already used.
             * If a name was already used, then the original mapping will have precedence.
View Full Code Here


                }
                count++;
            }
        }
        if (count >= desc.getMaximumOccurs()) {
            throw new InvalidParameterCardinalityException(Errors.format(
                    Errors.Keys.TooManyOccurrences_2, count, name), name.getCode());
        }
        addUnchecked(parameter);
        modCount++;
        return true;
View Full Code Here

            if (name.equals(values[i].getDescriptor().getName())) {
                count++;
            }
        }
        if (count >= desc.getMaximumOccurs()) {
            throw new InvalidParameterCardinalityException(Errors.format(
                    Errors.Keys.TooManyOccurrences_2, count, name), name.getCode());
        }
    }
View Full Code Here

                    if (++count > min) {
                        return;
                    }
                }
            }
            throw new InvalidParameterCardinalityException(Errors.format(
                    Errors.Keys.TooFewOccurrences_2, min, name), name.getCode());
        }
    }
View Full Code Here

                 * mapping was using a lower case name version of its original name, so we can discard that lower
                 * case version (the original name is still present in the map).
                 */
                final String oldName = nameFunction.apply(old);
                if (Objects.equals(name, oldName)) {
                    throw new InvalidParameterCardinalityException(Errors.format(Errors.Keys.ValueAlreadyDefined_1, name), name);
                }
            }
            /*
             * Add lower-cases versions of the above element names, only if that name is not already used.
             * If a name was already used, then the original mapping will have precedence.
View Full Code Here

            final int count = entry.getValue()[0];
            final int min   = descriptor.getMinimumOccurs();
            final int max   = descriptor.getMaximumOccurs();
            if (!(count>=min && count<=max)) {
                final String name = getName(descriptor);
                throw new InvalidParameterCardinalityException(Errors.format(
                          ErrorKeys.ILLEGAL_OCCURS_FOR_PARAMETER_$4, name, count, min, max), name);
            }
        }
    }
View Full Code Here

            if (AbstractIdentifiedObject.nameMatches(value.getDescriptor(), name)) {
                count++;
            }
        }
        if (count >= check.getMaximumOccurs()) {
            throw new InvalidParameterCardinalityException(Errors.format(
                      ErrorKeys.TOO_MANY_OCCURENCES_$2, name, count), name);
        }
        final ParameterValueGroup value = ((ParameterDescriptorGroup) check).createValue();
        values.add(value);
        return value;
View Full Code Here

                if (AbstractIdentifiedObject.nameMatches(value.getDescriptor(), name)) {
                    count++;
                }
            }
            if (count >= max) {
                throw new InvalidParameterCardinalityException(Errors.format(
                          ErrorKeys.TOO_MANY_OCCURENCES_$2, name, count), name);
            }
        }
        values.add(parameter);
        return true;
View Full Code Here

            }
        }
        final int min = type.getMinimumOccurs();
        if (count <= min) {
            final int max = type.getMaximumOccurs();
            throw new InvalidParameterCardinalityException(Errors.format(
                      ErrorKeys.ILLEGAL_OCCURS_FOR_PARAMETER_$4, name, count-1, min, max), name);
        }
        final GeneralParameterValue value = values.remove(index);
        assert value!=null && type.equals(value.getDescriptor()) : value;
        return value;
View Full Code Here

TOP

Related Classes of org.opengis.parameter.InvalidParameterCardinalityException

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.