Package org.geotools.parameter
Class ImagingParameters
- Object
-
- Formattable
-
- AbstractParameter
-
- ImagingParameters
-
- All Implemented Interfaces:
Serializable,Cloneable,GeneralParameterValue,ParameterValueGroup,Cloneable
public class ImagingParameters extends AbstractParameter implements ParameterValueGroup
Wraps a JAI'sParameterList. Any change to a parameter value in this group is reflected into the underlying parameter list, and conversely. This adaptor is provided for interoperability with Java Advanced Imaging. A typical usage is to wrap a JAI operation descriptor into an imaging parameter descriptor and create instances ofImagingParametersthrough thecreateValuemethod.- Since:
- 2.2
- Author:
- Martin Desruisseaux (IRD)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description ParameterListparametersThe JAI's parameter list.-
Fields inherited from class Formattable
SINGLE_LINE
-
-
Constructor Summary
Constructors Constructor Description ImagingParameters(Map<String,?> properties, ParameterList parameters)Constructs a parameter group wrapping the specified JAI parameters.ImagingParameters(ImagingParameterDescriptors descriptor)Constructs a parameter group for the specified descriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParameterValueGroupaddGroup(String name)Always throws an exception, since JAI's parameter list don't have subgroups.ImagingParametersclone()Returns a deep copy of this group of parameter values.booleanequals(Object object)Compares the specified object with this parameter group for equality.ParameterDescriptorGroupgetDescriptor()Returns the abstract definition of this parameter.List<ParameterValueGroup>groups(String name)Always throws an exception, since JAI's parameter list don't have subgroups.inthashCode()Returns a hash value for this parameter group.ParameterValueparameter(String name)Returns the value in this group for the specified identifier code.List<GeneralParameterValue>values()Returns all values in this group as an unmodifiable list.-
Methods inherited from class AbstractParameter
formatWKT, toString, write
-
Methods inherited from class Formattable
cleanupThreadLocals, toWKT, toWKT, toWKT, toWKT
-
-
-
-
Field Detail
-
parameters
public final ParameterList parameters
The JAI's parameter list. This is also the backing store for this parameter value group: all "ordinary" parameters (i.e. not including sources) are actually stored in this list.If the JAI descriptor is an instance of
OperationDescriptor, then this parameter list is also an instance ofParameterBlockJAI. The sources must be handled separatly, because the source type for a JAI operator (typicallyRenderedImage) is not the same than the source type for a coverage operation (typicallyorg.geotools.api.coverage.GridCoverage).
-
-
Constructor Detail
-
ImagingParameters
public ImagingParameters(ImagingParameterDescriptors descriptor)
Constructs a parameter group for the specified descriptor.- Parameters:
descriptor- The descriptor for this group of parameters.
-
ImagingParameters
public ImagingParameters(Map<String,?> properties, ParameterList parameters)
Constructs a parameter group wrapping the specified JAI parameters. A defaultImagingParameterDescriptorsis created.- Parameters:
properties- Set of properties. Should contains at least"name".parameters- The JAI's parameters.
-
-
Method Detail
-
getDescriptor
public ParameterDescriptorGroup getDescriptor()
Returns the abstract definition of this parameter.- Specified by:
getDescriptorin interfaceGeneralParameterValue- Specified by:
getDescriptorin interfaceParameterValueGroup- Overrides:
getDescriptorin classAbstractParameter- Returns:
- The abstract definition of this parameter or group of parameters.
-
values
public List<GeneralParameterValue> values()
Returns all values in this group as an unmodifiable list. The returned list contains all parameters found in the underlying parameter list. In addition, it may contains sources found in the JAI's operation descriptor.- Specified by:
valuesin interfaceParameterValueGroup- Returns:
- The values in this group.
-
parameter
public ParameterValue parameter(String name) throws ParameterNotFoundException
Returns the value in this group for the specified identifier code. Getter and setter methods will use directly the JAI's parameter list as the underlying backing store, when applicable.- Specified by:
parameterin interfaceParameterValueGroup- 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.
-
groups
public List<ParameterValueGroup> groups(String name) throws ParameterNotFoundException
Always throws an exception, since JAI's parameter list don't have subgroups.- Specified by:
groupsin interfaceParameterValueGroup- 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.
-
addGroup
public ParameterValueGroup addGroup(String name) throws ParameterNotFoundException
Always throws an exception, since JAI's parameter list don't have subgroups.- Specified by:
addGroupin interfaceParameterValueGroup- 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.
-
equals
public boolean equals(Object object)
Compares the specified object with this parameter group for equality.- Overrides:
equalsin classAbstractParameter- Parameters:
object- The object to compare tothis.- Returns:
trueif both objects are equal.
-
hashCode
public int hashCode()
Returns a hash value for this parameter group. This value doesn't need to be the same in past or future versions of this class.- Overrides:
hashCodein classAbstractParameter
-
clone
public ImagingParameters clone()
Returns a deep copy of this group of parameter values.- Specified by:
clonein interfaceCloneable- Specified by:
clonein interfaceGeneralParameterValue- Specified by:
clonein interfaceParameterValueGroup- Overrides:
clonein classAbstractParameter- Returns:
- A copy of this parameter value or group.
- See Also:
Object.clone()
-
-