org.geotools.parameter
Class ImagingParameters

java.lang.Object
  extended byorg.geotools.referencing.wkt.Formattable
      extended byorg.geotools.parameter.AbstractParameter
          extended byorg.geotools.parameter.ImagingParameters
All Implemented Interfaces:
org.opengis.util.Cloneable, java.lang.Cloneable, org.opengis.parameter.GeneralParameterValue, org.opengis.parameter.ParameterValueGroup, java.io.Serializable

public class ImagingParameters
extends AbstractParameter
implements org.opengis.parameter.ParameterValueGroup

Wraps a JAI's ParameterList. 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 of through the createValue method.

Since:
2.2
Version:
$Id: ImagingParameters.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
Serialized Form

Field Summary
 javax.media.jai.ParameterList parameters
          The JAI's parameter list.
 
Constructor Summary
ImagingParameters(ImagingParameterDescriptors descriptor)
          Constructs a parameter group for the specified descriptor.
ImagingParameters(java.util.Map properties, javax.media.jai.ParameterList parameters)
          Constructs a parameter group wrapping the specified JAI parameters.
 
Method Summary
 org.opengis.parameter.ParameterValueGroup addGroup(java.lang.String name)
          Always throws an exception, since JAI's parameter list don't have subgroups.
 java.lang.Object clone()
          Returns a deep copy of this group of parameter values.
 boolean equals(java.lang.Object object)
          Compares the specified object with this parameter group for equality.
 java.util.List groups(java.lang.String name)
          Always throws an exception, since JAI's parameter list don't have subgroups.
 int hashCode()
          Returns a hash value for this parameter group.
 org.opengis.parameter.ParameterValue parameter(java.lang.String name)
          Returns the value in this group for the specified identifier code.
 java.util.List values()
          Returns all values in this group as an unmodifiable list.
 
Methods inherited from class org.geotools.parameter.AbstractParameter
formatWKT, getDescriptor, toString, write
 
Methods inherited from class org.geotools.referencing.wkt.Formattable
toWKT, toWKT, toWKT
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.parameter.GeneralParameterValue
getDescriptor
 

Field Detail

parameters

public final javax.media.jai.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 of ParameterBlockJAI. The sources must be handled separatly, because the source type for a JAI operator (typically RenderedImage) is not the same than the source type for a coverage operation (typically org.opengis.coverage.GridCoverage).

Constructor Detail

ImagingParameters

public ImagingParameters(ImagingParameterDescriptors descriptor)
Constructs a parameter group for the specified descriptor.


ImagingParameters

public ImagingParameters(java.util.Map properties,
                         javax.media.jai.ParameterList parameters)
Constructs a parameter group wrapping the specified JAI parameters. A default ImagingParameterDescriptors is created.

Parameters:
properties - Set of properties. Should contains at least .
parameters - The JAI's parameters.
Method Detail

values

public java.util.List 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:
values in interface org.opengis.parameter.ParameterValueGroup

parameter

public org.opengis.parameter.ParameterValue parameter(java.lang.String name)
                                               throws org.opengis.parameter.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:
parameter in interface org.opengis.parameter.ParameterValueGroup
Parameters:
name - The case insensitive identifier code of the parameter to search for.
Returns:
The parameter value for the given identifier code.
Throws:
org.opengis.parameter.ParameterNotFoundException - if there is no parameter value for the given identifier code.

groups

public java.util.List groups(java.lang.String name)
                      throws org.opengis.parameter.ParameterNotFoundException
Always throws an exception, since JAI's parameter list don't have subgroups.

Specified by:
groups in interface org.opengis.parameter.ParameterValueGroup
Throws:
org.opengis.parameter.ParameterNotFoundException

addGroup

public org.opengis.parameter.ParameterValueGroup addGroup(java.lang.String name)
                                                   throws org.opengis.parameter.ParameterNotFoundException,
                                                          java.lang.IllegalStateException
Always throws an exception, since JAI's parameter list don't have subgroups.

Specified by:
addGroup in interface org.opengis.parameter.ParameterValueGroup
Throws:
org.opengis.parameter.ParameterNotFoundException
java.lang.IllegalStateException

equals

public boolean equals(java.lang.Object object)
Compares the specified object with this parameter group for equality.

Overrides:
equals in class AbstractParameter
Parameters:
object - The object to compare to .
Returns:
if 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:
hashCode in class AbstractParameter

clone

public java.lang.Object clone()
Returns a deep copy of this group of parameter values.

Specified by:
clone in interface org.opengis.parameter.ParameterValueGroup
Overrides:
clone in class AbstractParameter


Copyright © GeoTools. All Rights Reserved.