001    /*
002     *    GeoAPI - Java interfaces for OGC/ISO standards
003     *    http://www.geoapi.org
004     *
005     *    Copyright (C) 2004-2012 Open Geospatial Consortium, Inc.
006     *    All Rights Reserved. http://www.opengeospatial.org/ogc/legal
007     *
008     *    Permission to use, copy, and modify this software and its documentation, with
009     *    or without modification, for any purpose and without fee or royalty is hereby
010     *    granted, provided that you include the following on ALL copies of the software
011     *    and documentation or portions thereof, including modifications, that you make:
012     *
013     *    1. The full text of this NOTICE in a location viewable to users of the
014     *       redistributed or derivative work.
015     *    2. Notice of any changes or modifications to the OGC files, including the
016     *       date changes were made.
017     *
018     *    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
019     *    NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
020     *    TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
021     *    THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
022     *    PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
023     *
024     *    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
025     *    CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
026     *
027     *    The name and trademarks of copyright holders may NOT be used in advertising or
028     *    publicity pertaining to the software without specific, written prior permission.
029     *    Title to copyright in this software and any associated documentation will at all
030     *    times remain with copyright holders.
031     */
032    package org.opengis.parameter;
033    
034    import org.opengis.referencing.IdentifiedObject;
035    import org.opengis.annotation.UML;
036    
037    import static org.opengis.annotation.Obligation.*;
038    import static org.opengis.annotation.Specification.*;
039    
040    
041    /**
042     * Abstract definition of a parameter or group of parameters used by an operation method.
043     *
044     * @departure rename
045     *   GeoAPI uses a name which contains the "<code>Descriptor</code>" word for consistency with other
046     *   libraries in Java (e.g. <code>ParameterListDescriptor</code> in Java Advanced Imaging).
047     *
048     * @author  Martin Desruisseaux (IRD)
049     * @author  Jody Garnett (Refractions Research)
050     * @version 3.0
051     * @since   2.0
052     *
053     * @see GeneralParameterValue
054     *
055     * @navassoc 1 - - GeneralParameterValue
056     */
057    @UML(identifier="CC_GeneralOperationParameter", specification=ISO_19111)
058    public interface GeneralParameterDescriptor extends IdentifiedObject {
059        /**
060         * Creates a new instance of {@linkplain GeneralParameterValue parameter value or group}
061         * initialized with the {@linkplain ParameterDescriptor#getDefaultValue default value(s)}.
062         * The {@linkplain GeneralParameterValue#getDescriptor parameter value descriptor} for
063         * the created parameter value(s) will be {@code this} object.
064         *
065         * @return A new parameter initialized to its default value.
066         *
067         * @departure extension
068         *   This method is not part of the ISO specification. It is provided in GeoAPI as a kind of
069         *   factory method.
070         */
071        GeneralParameterValue createValue();
072    
073        /**
074         * The minimum number of times that values for this parameter group or
075         * parameter are required. The default value is one. A value of 0 means
076         * an optional parameter.
077         *
078         * @return The minimum occurrence.
079         *
080         * @see #getMaximumOccurs()
081         */
082        @UML(identifier="minimumOccurs", obligation=OPTIONAL, specification=ISO_19111)
083        int getMinimumOccurs();
084    
085        /**
086         * The maximum number of times that values for this parameter group or
087         * parameter can be included. For a {@linkplain ParameterDescriptor single parameter},
088         * the value is always 1. For a {@linkplain ParameterDescriptorGroup parameter group},
089         * it may vary. The default value is one.
090         *
091         * @departure generalization
092         *   Moved up (in the interface hierarchy) the <code>maximumOccurs</code> method from
093         *   <code>ParameterDescriptorGroup</code> into this super-interface, for parallelism
094         *   with the <code>minimumOccurs</code> method.
095         *
096         * @return The maximum occurrence.
097         *
098         * @see #getMinimumOccurs()
099         */
100        @UML(identifier="CC_OperationParameterGroup.maximumOccurs", obligation=OPTIONAL, specification=ISO_19111)
101        int getMaximumOccurs();
102    }