org.geotools.parameter
Class ImagingParameterDescriptors

java.lang.Object
  extended byorg.geotools.referencing.wkt.Formattable
      extended byorg.geotools.referencing.AbstractIdentifiedObject
          extended byorg.geotools.parameter.AbstractParameterDescriptor
              extended byorg.geotools.parameter.DefaultParameterDescriptorGroup
                  extended byorg.geotools.parameter.ImagingParameterDescriptors
All Implemented Interfaces:
org.opengis.parameter.GeneralParameterDescriptor, org.opengis.referencing.IdentifiedObject, org.opengis.parameter.ParameterDescriptorGroup, java.io.Serializable

public class ImagingParameterDescriptors
extends DefaultParameterDescriptorGroup

Wraps a JAI's ParameterListDescriptor. This adaptor is provided for interoperability with Java Advanced Imaging. A JAI parameter list descriptor is part of an operation descriptor. This adaptor make it easier to access parameters for a JAI operation through the general GeoAPI parameters framework.

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

Field Summary
static java.util.Map DEFAULT_SOURCE_TYPE_MAP
          The default source type map as a (RenderedImage.class, GridCoverage.class) key-value pair.
protected  javax.media.jai.ParameterListDescriptor descriptor
          The Java Advanced Imaging parameter descriptor.
protected  javax.media.jai.RegistryElementDescriptor operation
          The JAI's operation descriptor, or if none.
 
Fields inherited from class org.geotools.referencing.AbstractIdentifiedObject
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR
 
Fields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
 
Constructor Summary
ImagingParameterDescriptors(java.util.Map properties, javax.media.jai.ParameterListDescriptor descriptor)
          Constructs a parameter descriptor wrapping the specified JAI parameter list descriptor.
ImagingParameterDescriptors(java.util.Map properties, javax.media.jai.RegistryElementDescriptor operation, java.util.Map sourceTypeMap, java.lang.String registryMode)
          Constructs a parameter descriptor wrapping the specified JAI operation, including sources.
ImagingParameterDescriptors(javax.media.jai.RegistryElementDescriptor operation)
          Constructs a parameter descriptor wrapping the specified JAI operation, including sources.
 
Method Summary
 org.opengis.parameter.GeneralParameterValue createValue()
          Creates a new instance of parameter value group.
 boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)
          Compares the specified object with this parameter group for equality.
 int hashCode()
          Returns a hash value for this parameter.
static java.util.Map properties(javax.media.jai.RegistryElementDescriptor operation)
          Infers from the specified JAI operation a set of properties that can be given to the constructor.
 
Methods inherited from class org.geotools.parameter.DefaultParameterDescriptorGroup
descriptor, descriptors, getMaximumOccurs
 
Methods inherited from class org.geotools.parameter.AbstractParameterDescriptor
formatWKT, getMinimumOccurs
 
Methods inherited from class org.geotools.referencing.AbstractIdentifiedObject
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches
 
Methods inherited from class org.geotools.referencing.wkt.Formattable
toString, toWKT, toWKT, toWKT
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.parameter.GeneralParameterDescriptor
getMinimumOccurs
 
Methods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
 

Field Detail

DEFAULT_SOURCE_TYPE_MAP

public static final java.util.Map DEFAULT_SOURCE_TYPE_MAP
The default source type map as a (RenderedImage.class, GridCoverage.class) key-value pair. This is the default argument for wrapping a JAI operation in the "rendered" registry mode.


operation

protected final javax.media.jai.RegistryElementDescriptor operation
The JAI's operation descriptor, or if none. This is usually an instance of OperationDescriptor, but this is not strictly required.


descriptor

protected final javax.media.jai.ParameterListDescriptor descriptor
The Java Advanced Imaging parameter descriptor. If operation is non-null, then this attribute is defined by RegistryElementDescriptor.getParameterListDescriptor(java.lang.String).

Constructor Detail

ImagingParameterDescriptors

public ImagingParameterDescriptors(javax.media.jai.RegistryElementDescriptor operation)
Constructs a parameter descriptor wrapping the specified JAI operation, including sources. The name for this parameter group will be inferred from the name of the supplied registry element using the properties method. The source type map default to a (RenderedImage.class, GridCoverage.class) key-value pair and the registry mode default to "rendered".

Parameters:
operation - The JAI's operation descriptor, usually as an instance of OperationDescriptor.

ImagingParameterDescriptors

public ImagingParameterDescriptors(java.util.Map properties,
                                   javax.media.jai.RegistryElementDescriptor operation,
                                   java.util.Map sourceTypeMap,
                                   java.lang.String registryMode)
Constructs a parameter descriptor wrapping the specified JAI operation, including sources. The properties map is given unchanged to the super-class constructor.

Parameters:
properties - Set of properties. Should contains at least .
operation - The JAI's operation descriptor, usually as an instance of OperationDescriptor.
sourceTypeMap - Mapping from JAI source type to this group source type. Typically a singleton with the (RenderedImage.class, GridCoverage.class) key-value pair.
registryMode - The JAI's registry mode (usually "rendered").

ImagingParameterDescriptors

public ImagingParameterDescriptors(java.util.Map properties,
                                   javax.media.jai.ParameterListDescriptor descriptor)
Constructs a parameter descriptor wrapping the specified JAI parameter list descriptor. The properties map is given unchanged to the super-class constructor.

Parameters:
properties - Set of properties. Should contains at least .
descriptor - The JAI descriptor.
Method Detail

properties

public static java.util.Map properties(javax.media.jai.RegistryElementDescriptor operation)
Infers from the specified JAI operation a set of properties that can be given to the constructor. The returned map includes values (when available) for the following keys:

Key Inferred from
NAME_KEY descriptor name
ALIAS_KEY (for the scope) and resources
AUTHORITY_KEY JAI or Geotools inferred from the vendor, extented with resources as contact information.
VERSION_KEY resources
REMARKS_KEY resources

For JAI image operation (for example , the end result is fully-qualified name like and one alias like .

This method returns a modifiable map. Users can safely changes its content in order to select for example a different name.


createValue

public org.opengis.parameter.GeneralParameterValue createValue()
Creates a new instance of parameter value group. A JAI ParameterList is created for holding parameter values, and wrapped into an ImagingParameters instance.

Specified by:
createValue in interface org.opengis.parameter.GeneralParameterDescriptor
Overrides:
createValue in class DefaultParameterDescriptorGroup

equals

public boolean equals(AbstractIdentifiedObject object,
                      boolean compareMetadata)
Compares the specified object with this parameter group for equality.

Overrides:
equals in class DefaultParameterDescriptorGroup
Parameters:
object - The object to compare to .
compareMetadata - for performing a strict comparaison, or for comparing only properties relevant to transformations.
Returns:
if both objects are equal.

hashCode

public int hashCode()
Returns a hash value for this parameter. This value doesn't need to be the same in past or future versions of this class.

Overrides:
hashCode in class DefaultParameterDescriptorGroup
Returns:
The hash code value. This value doesn't need to be the same in past or future versions of this class.


Copyright © GeoTools. All Rights Reserved.