- All Superinterfaces:
GeneralParameterValue
@UML(identifier="CC_ParameterValueGroup",
specification=ISO_19111)
public interface ParameterValueGroup
extends GeneralParameterValue
A group of related parameter values. The same group can be repeated more than once in an
coordinate operation
or higher level
ParameterValueGroup
, if those instances contain different values
of one or more ParameterValue
s which suitably distinquish among those groups.- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new group of the specified name.clone()
Returns a copy of this group of parameter values.The abstract definition of this group of parameters.Returns all subgroups with the specified name.Returns the value in this group for the specified identifier code.values()
Returns the values in this group.
-
Method Details
-
getDescriptor
@UML(identifier="group", obligation=MANDATORY, specification=ISO_19111) ParameterDescriptorGroup getDescriptor()The abstract definition of this group of parameters.- Specified by:
getDescriptor
in interfaceGeneralParameterValue
- Returns:
- The abstract definition of this parameter or group of parameters.
- Departure from OGC/ISO abstract specification:
Change of name without change in functionality
The ISO name was "group
". GeoAPI uses "descriptor
" instead in order to override thegetDescriptor()
generic method provided in the parent interface. In addition the "descriptor" name makes more apparent that this method returns an abstract definition of parameters - not their actual values - and is consistent with usage in other Java libraries like the Java Advanced Imaging library.
-
values
@UML(identifier="parameterValue", obligation=MANDATORY, specification=ISO_19111) List<GeneralParameterValue> values()Returns the values in this group. The returned list may or may not be unmodifiable; this is implementation-dependent. However, if some aspects of this list are modifiable, then any modification shall be reflected back into thisParameterValueGroup
. More specifically:If the list supports the
add
operation, then it should ensure that the added general parameter value is valid and can be added to this group. AnInvalidParameterCardinalityException
(or any other appropriate exception) shall be thrown if it is not the case.The list may also supports the
remove
operation as a way to remove parameter created by theparameter(String)
method.
- Returns:
- The values in this group.
-
parameter
Returns the value in this group for the specified identifier code. If no parameter value is found but a parameter descriptor is found (which may occurs if the parameter is optional, i.e.minimumOccurs == 0
), then a parameter value is automatically created and initialized to its default value (if any).This convenience method provides a way to get and set parameter values by name. For example the following idiom fetches a floating point value for the
"false_easting"
parameter:
This method do not search recursively in subgroups. This is because more than one subgroup may exist for the same descriptor. The user must query all subgroups and select explicitly the appropriate one to use.double value = parameter("false_easting").doubleValue();
- Parameters:
name
- The case insensitive identifier code of the parameter to search for.- Returns:
- The parameter value for the given identifier code.
- Throws:
ParameterNotFoundException
- if there is no parameter value for the given identifier code.- Departure from OGC/ISO abstract specification:
Extension for convenience without introduction of new functionality
This method is not part of the ISO specification. It has been added in an attempt to make this interface easier to use.
-
groups
Returns all subgroups with the specified name. This method do not create new groups. If the requested group is optional (i.e.minimumOccurs == 0
) and no value were defined previously, then this method returns an empty set.- Parameters:
name
- The case insensitive identifier code of the parameter group to search for.- Returns:
- The set of all parameter group for the given identifier code.
- Throws:
ParameterNotFoundException
- if no descriptor was found for the given name.- Departure from OGC/ISO abstract specification:
Extension for convenience without introduction of new functionality
This method is not part of the ISO specification. It has been added in an attempt to make this interface easier to use.
-
addGroup
Creates a new group of the specified name. The specified name must be the identifier code of a descriptor group.- Parameters:
name
- The case insensitive identifier code of the parameter group to create.- Returns:
- A newly created parameter group for the given identifier code.
- Throws:
ParameterNotFoundException
- if no descriptor was found for the given name.InvalidParameterCardinalityException
- If this parameter group already contains the maximum number of occurences of subgroups of the given name.IllegalStateException
- If the group cannot be added for another reason.- Departure from OGC/ISO abstract specification:
Extension for convenience without introduction of new functionality
This method is not part of the ISO specification. It has been added in an attempt to make this interface easier to use.
-
clone
ParameterValueGroup clone()Returns a copy of this group of parameter values. Included parameter values and subgroups are cloned recursively.- Specified by:
clone
in interfaceGeneralParameterValue
- Returns:
- A copy of this group of parameter values.
-