- Type Parameters:
T
- the type of parameter values.
- All Superinterfaces:
GeneralParameterDescriptor
,IdentifiedObject
@UML(identifier="OperationParameter",
specification=ISO_19111)
public interface ParameterDescriptor<T>
extends GeneralParameterDescriptor
The definition of a parameter used by an operation method.
Most parameter values are numeric, but other types of parameter values are possible.
A parameter descriptor contains the following properties:
- The parameter name.
- The class of values. This is usually
Double
,double[]
,Integer
,int[]
,Boolean
,String
orURI
. - Whether this parameter is optional or mandatory. This is specified by the minimum occurrences number, which can be 0 or 1 respectively.
- The default value and its unit of measurement.
- The domain of values, as a minimum value, maximum value or an enumeration of valid values.
- Since:
- 2.0
- See Also:
Departure from OGC/ISO standard in the name
GeoAPI uses a name which contains the "Descriptor
" word for consistency with other
libraries in Java (e.g. ParameterListDescriptor
in Java Advanced Imaging).
-
Field Summary
Fields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, DOMAINS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new instance of parameter value initialized with the default value.default T
Returns the default value for the parameter.default Comparable
<T> Returns the maximum parameter value.default Comparable
<T> Returns the minimum parameter value.default javax.measure.Unit
<?> getUnit()
Returns the unit of measurement for the minimum, maximum and default values.Returns the set of allowed values when these are restricted to some finite set or returnsnull
otherwise.Returns the class that describes the type of parameter values.Returns the name that describes the type of parameter values.Methods inherited from interface org.opengis.parameter.GeneralParameterDescriptor
getDescription, getDirection, getMaximumOccurs, getMinimumOccurs, getName
Methods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getDomains, getIdentifiers, getRemarks, toWKT
-
Method Details
-
getValueType
@UML(identifier="DQM_Parameter.valueType", obligation=MANDATORY, specification=ISO_19157) TypeName getValueType()Returns the name that describes the type of parameter values. This is closely related to theClass
returned bygetValueClass()
:- If the value class is a collection (e.g.
List
or array), then this method returns the type of elements in the collection. - Otherwise this method returns the value class using the mapping documented in
TypeName
javadoc or using an implementation-dependent mapping.
TypeName
is used for encoding parameters in XML or JSON documents, whilegetValueClass()
is used for programmatic purposes.- Returns:
- the type name of value component(s) in this parameter.
- Since:
- 3.1
- If the value class is a collection (e.g.
-
getValueClass
@UML(identifier="GC_ParameterInfo.type", obligation=MANDATORY, specification=OGC_01004) Class<T> getValueClass()Returns the class that describes the type of parameter values. This is usually (but not restricted to)Boolean
,Integer
,Double
,String
orURI
when the parameter contains a single value. If the parameter can contain multiple values, then the class may beint[]
,double[]
,List
,Set
orMap
.- Returns:
- the type of parameter values.
-
getValidValues
Returns the set of allowed values when these are restricted to some finite set or returnsnull
otherwise. The returned set usually contains code list or enumeration elements.Note: it is not necessary to provide this property when all values from the code list or enumeration are allowed.- Returns:
- a finite set of valid values (usually from a
CodeList
), ornull
if it does not apply or if there is no restriction.
Extension to OGC/ISO standard
This method is not part of ISO specification. It is provided as a complement of information. -
getMinimumValue
@UML(identifier="GC_ParameterInfo.minimumValue", obligation=OPTIONAL, specification=OGC_01004) default Comparable<T> getMinimumValue()Returns the minimum parameter value. If there is no minimum value, or if the minimum value is inappropriate for the value class, then this method returnsnull
.- Returns:
- the minimum parameter value (often an instance of
Double
), ornull
. - See Also:
-
getMaximumValue
@UML(identifier="GC_ParameterInfo.maximumValue", obligation=OPTIONAL, specification=OGC_01004) default Comparable<T> getMaximumValue()Returns the maximum parameter value. If there is no maximum value, or if the maximum value is inappropriate for the value class, then this method returnsnull
.- Returns:
- the maximum parameter value (often an instance of
Double
), ornull
. - See Also:
-
getDefaultValue
@UML(identifier="GC_ParameterInfo.defaultValue", obligation=OPTIONAL, specification=OGC_01004) default T getDefaultValue()Returns the default value for the parameter. If there is no default value, then this method returnsnull
.- Returns:
- the default value, or
null
in none. - See Also:
-
getUnit
Returns the unit of measurement for the minimum, maximum and default values. This attribute applies only if the value is of numeric type (usually an instance ofDouble
).- Returns:
- the unit for numeric value, or
null
if it does not apply to the value type. - See Also:
Extension to OGC/ISO standard
This method is not part of ISO specification. It is provided as a complement of information. -
createValue
Creates a new instance of parameter value initialized with the default value. While not a requirement, the parameter value descriptor for the created parameter value will typically bethis
descriptor instance.- Specified by:
createValue
in interfaceGeneralParameterDescriptor
- Returns:
- a new parameter value initialized to the default value.
- See Also:
Extension to OGC/ISO standard
This method is not part of the ISO specification. It is provided in GeoAPI as a kind of factory method.
-