Package org.opengis.parameter
Interface ParameterDescriptor<T>
-
- Type Parameters:
T- the type of parameter values.
- All Superinterfaces:
GeneralParameterDescriptor,IdentifiedObject
@UML(identifier="CC_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,URIorCitation. - 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:
ParameterValue,ParameterDescriptorGroup
Departure from OGC/ISO specification:
GeoAPI uses a name which contains the "Descriptor" word for consistency with other libraries in Java (e.g.ParameterListDescriptorin Java Advanced Imaging).
-
-
Field Summary
-
Fields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
-
-
Method Summary
Modifier and Type Method Description ParameterValue<T>createValue()Creates a new instance of parameter value initialized with the default value.default TgetDefaultValue()Returns the default value for the parameter.default Comparable<T>getMaximumValue()Returns the maximum parameter value.default Comparable<T>getMinimumValue()Returns the minimum parameter value.default Unit<?>getUnit()default Set<T>getValidValues()Returns the set of allowed values when these are restricted to some finite set or returnsnullotherwise.Class<T>getValueClass()Returns the class that describe the type of the parameter.-
Methods inherited from interface GeneralParameterDescriptor
getDescription, getDirection, getMaximumOccurs, getMinimumOccurs, getName
-
Methods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getRemarks, toWKT
-
-
-
-
Method Detail
-
getValueClass
@UML(identifier="GC_ParameterInfo.type", obligation=MANDATORY, specification=ISO_19111) Class<T> getValueClass()
Returns the class that describe the type of the parameter.- Returns:
- the type of parameter values.
-
getValidValues
default Set<T> getValidValues()
Returns the set of allowed values when these are restricted to some finite set or returnsnullotherwise. 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), ornullif it does not apply or if there is no restriction.
Departure from OGC/ISO specification:
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=ISO_19111) 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.
-
getMaximumValue
@UML(identifier="GC_ParameterInfo.maximumValue", obligation=OPTIONAL, specification=ISO_19111) 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.
-
getDefaultValue
@UML(identifier="GC_ParameterInfo.defaultValue", obligation=OPTIONAL, specification=ISO_19111) 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
nullin none.
-
getUnit
default Unit<?> getUnit()
Returns the unit of measurement for the minimum, maximum and default values. This attribute apply only if the values is of numeric type (usually an instance ofDouble).- Returns:
- the unit for numeric value, or
nullif it does not apply to the value type.
Departure from OGC/ISO specification:
This method is not part of ISO specification. It is provided as a complement of information.
-
createValue
ParameterValue<T> 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 bethisdescriptor instance.- Specified by:
createValuein interfaceGeneralParameterDescriptor- Returns:
- a new parameter initialized to its default value.
Departure from OGC/ISO specification:
This method is not part of the ISO specification. It is provided in GeoAPI as a kind of factory method.
-
-