Package org.geotools.parameter
Class DefaultParameterDescriptorGroup
- Object
-
- Formattable
-
- AbstractIdentifiedObject
-
- AbstractParameterDescriptor
-
- DefaultParameterDescriptorGroup
-
- All Implemented Interfaces:
Serializable,GeneralParameterDescriptor,ParameterDescriptorGroup,IdentifiedObject
- Direct Known Subclasses:
ImagingParameterDescriptors,MatrixParameterDescriptors
public class DefaultParameterDescriptorGroup extends AbstractParameterDescriptor implements ParameterDescriptorGroup
The definition of a group of related parameters used by an operation method.- Since:
- 2.1
- Author:
- Martin Desruisseaux (IRD)
- See Also:
ParameterGroup,DefaultParameterDescriptor, Serialized Form
-
-
Field Summary
-
Fields inherited from class AbstractIdentifiedObject
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR
-
Fields inherited from class Formattable
SINGLE_LINE
-
Fields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
-
-
Constructor Summary
Constructors Constructor Description DefaultParameterDescriptorGroup(String name, GeneralParameterDescriptor... parameters)Constructs a parameter group from a name.DefaultParameterDescriptorGroup(Map<String,?> properties, int minimumOccurs, int maximumOccurs, GeneralParameterDescriptor... parameters)Constructs a parameter group from a set of properties.DefaultParameterDescriptorGroup(Map<String,?> properties, GeneralParameterDescriptor... parameters)Constructs a parameter group from a set of properties.DefaultParameterDescriptorGroup(Citation authority, String name, GeneralParameterDescriptor... parameters)Constructs a parameter group from a name and an authority.DefaultParameterDescriptorGroup(ParameterDescriptorGroup group)Constructs a group with the same values than the specified one.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParameterValueGroupcreateValue()Creates a new instance of parameter value group initialized with the default values.GeneralParameterDescriptordescriptor(String name)Returns the first parameter in this group for the specified identifier code.List<GeneralParameterDescriptor>descriptors()Returns the parameters in this group.booleanequals(AbstractIdentifiedObject object, boolean compareMetadata)Compares the specified object with this parameter group for equality.intgetMaximumOccurs()The maximum number of times that values for this parameter group are required.inthashCode()Returns a hash value for this parameter.-
Methods inherited from class AbstractParameterDescriptor
formatWKT, getMinimumOccurs
-
Methods inherited from class AbstractIdentifiedObject
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches, nameMatches
-
Methods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKT
-
Methods inherited from interface GeneralParameterDescriptor
getMinimumOccurs
-
Methods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
-
-
-
Constructor Detail
-
DefaultParameterDescriptorGroup
public DefaultParameterDescriptorGroup(ParameterDescriptorGroup group)
Constructs a group with the same values than the specified one. This copy constructor may be used in order to wraps an arbitrary implementation into a Geotools one.- Since:
- 2.2
-
DefaultParameterDescriptorGroup
public DefaultParameterDescriptorGroup(String name, GeneralParameterDescriptor... parameters)
Constructs a parameter group from a name. This parameter group will be required exactly once.- Parameters:
name- The parameter group name.parameters- The parameter descriptors for this group.
-
DefaultParameterDescriptorGroup
public DefaultParameterDescriptorGroup(Citation authority, String name, GeneralParameterDescriptor... parameters)
Constructs a parameter group from a name and an authority. This parameter group will be required exactly once.- Parameters:
authority- The authority (e.g.OGC).name- The parameter group name.parameters- The parameter descriptors for this group.- Since:
- 2.2
-
DefaultParameterDescriptorGroup
public DefaultParameterDescriptorGroup(Map<String,?> properties, GeneralParameterDescriptor... parameters)
Constructs a parameter group from a set of properties. This parameter group will be required exactly once. The properties map is given unchanged to the super-class constructor.- Parameters:
properties- Set of properties. Should contains at least"name".parameters- The parameter descriptors for this group.
-
DefaultParameterDescriptorGroup
public DefaultParameterDescriptorGroup(Map<String,?> properties, int minimumOccurs, int maximumOccurs, GeneralParameterDescriptor... parameters)
Constructs a parameter group from a set of properties. The properties map is given unchanged to the super-class constructor.- Parameters:
properties- Set of properties. Should contains at least"name".minimumOccurs- The minimum number of times that values for this parameter group are required.maximumOccurs- The maximum number of times that values for this parameter group are required.parameters- The parameter descriptors for this group.
-
-
Method Detail
-
getMaximumOccurs
public int getMaximumOccurs()
The maximum number of times that values for this parameter group are required.- Specified by:
getMaximumOccursin interfaceGeneralParameterDescriptor- Specified by:
getMaximumOccursin classAbstractParameterDescriptor- Returns:
- The maximum occurence.
- See Also:
AbstractParameterDescriptor.getMinimumOccurs()
-
createValue
public ParameterValueGroup createValue()
Creates a new instance of parameter value group initialized with the default values. The parameter value descriptor for the created group will bethisobject.- Specified by:
createValuein interfaceGeneralParameterDescriptor- Specified by:
createValuein interfaceParameterDescriptorGroup- Specified by:
createValuein classAbstractParameterDescriptor- Returns:
- A new parameter initialized to its default value.
-
descriptors
public List<GeneralParameterDescriptor> descriptors()
Returns the parameters in this group.- Specified by:
descriptorsin interfaceParameterDescriptorGroup- Returns:
- The descriptor of this group.
-
descriptor
public GeneralParameterDescriptor descriptor(String name) throws ParameterNotFoundException
Returns the first parameter in this group for the specified identifier code.- Specified by:
descriptorin interfaceParameterDescriptorGroup- Parameters:
name- The case insensitive identifier code of the parameter to search for.- Returns:
- The parameter for the given identifier code.
- Throws:
ParameterNotFoundException- if there is no parameter for the given identifier code.
-
equals
public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)
Compares the specified object with this parameter group for equality.- Overrides:
equalsin classAbstractParameterDescriptor- Parameters:
object- The object to compare tothis.compareMetadata-truefor performing a strict comparaison, orfalsefor comparing only properties relevant to transformations.- Returns:
trueif both objects are equal.
-
hashCode
public int hashCode()
Returns a hash value for this parameter.- Overrides:
hashCodein classAbstractParameterDescriptor- Returns:
- The hash code value. This value doesn't need to be the same in past or future versions of this class.
-
-