1 /*
2  *    GeoAPI - Java interfaces for OGC/ISO standards
3  *    http://www.geoapi.org
4  *
5  *    Copyright (C) 2004-2011 Open Geospatial Consortium, Inc.
6  *    All Rights Reserved. http://www.opengeospatial.org/ogc/legal
7  *
8  *    Permission to use, copy, and modify this software and its documentation, with
9  *    or without modification, for any purpose and without fee or royalty is hereby
10  *    granted, provided that you include the following on ALL copies of the software
11  *    and documentation or portions thereof, including modifications, that you make:
12  *
13  *    1. The full text of this NOTICE in a location viewable to users of the
14  *       redistributed or derivative work.
15  *    2. Notice of any changes or modifications to the OGC files, including the
16  *       date changes were made.
17  *
18  *    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
19  *    NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
20  *    TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
21  *    THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
22  *    PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
23  *
24  *    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
25  *    CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
26  *
27  *    The name and trademarks of copyright holders may NOT be used in advertising or
28  *    publicity pertaining to the software without specific, written prior permission.
29  *    Title to copyright in this software and any associated documentation will at all
30  *    times remain with copyright holders.
31  */
32 package org.opengis.parameter;
33 
34 import org.opengis.referencing.IdentifiedObject;
35 import org.opengis.annotation.UML;
36 
37 import static org.opengis.annotation.Obligation.*;
38 import static org.opengis.annotation.Specification.*;
39 
40 
41 /**
42  * Abstract definition of a parameter or group of parameters used by an operation method.
43  *
44  * @departure rename
45  *   GeoAPI uses a name which contains the "<code>Descriptor</code>" word for consistency with other
46  *   libraries in Java (e.g. <code>ParameterListDescriptor</code> in Java Advanced Imaging).
47  *
48  * @author  Martin Desruisseaux (IRD)
49  * @author  Jody Garnett (Refractions Research)
50  * @version 3.0
51  * @since   2.0
52  *
53  * @see GeneralParameterValue
54  *
55  * @navassoc 1 - - GeneralParameterValue
56  */
57 @UML(identifier="CC_GeneralOperationParameter", specification=ISO_19111)
58 public interface GeneralParameterDescriptor extends IdentifiedObject {
59     /**
60      * Creates a new instance of {@linkplain GeneralParameterValue parameter value or group}
61      * initialized with the {@linkplain ParameterDescriptor#getDefaultValue default value(s)}.
62      * The {@linkplain GeneralParameterValue#getDescriptor parameter value descriptor} for
63      * the created parameter value(s) will be {@code this} object.
64      *
65      * @return A new parameter initialized to its default value.
66      *
67      * @departure extension
68      *   This method is not part of the ISO specification. It is provided in GeoAPI as a kind of
69      *   factory method.
70      */
createValue()71     GeneralParameterValue createValue();
72 
73     /**
74      * The minimum number of times that values for this parameter group or
75      * parameter are required. The default value is one. A value of 0 means
76      * an optional parameter.
77      *
78      * @return The minimum occurrence.
79      *
80      * @see #getMaximumOccurs()
81      */
82     @UML(identifier="minimumOccurs", obligation=OPTIONAL, specification=ISO_19111)
getMinimumOccurs()83     int getMinimumOccurs();
84 
85     /**
86      * The maximum number of times that values for this parameter group or
87      * parameter can be included. For a {@linkplain ParameterDescriptor single parameter},
88      * the value is always 1. For a {@linkplain ParameterDescriptorGroup parameter group},
89      * it may vary. The default value is one.
90      *
91      * @departure generalization
92      *   Moved up (in the interface hierarchy) the <code>maximumOccurs</code> method from
93      *   <code>ParameterDescriptorGroup</code> into this  super-interface, for parallelism
94      *   with the <code>minimumOccurs</code> method.
95      *
96      * @return The maximum occurrence.
97      *
98      * @see #getMinimumOccurs()
99      */
100     @UML(identifier="CC_OperationParameterGroup.maximumOccurs", obligation=OPTIONAL, specification=ISO_19111)
getMaximumOccurs()101     int getMaximumOccurs();
102 }
103