org.geotools.coverage.processing
Class AbstractOperation

java.lang.Object
  extended byorg.geotools.coverage.processing.AbstractOperation
All Implemented Interfaces:
org.opengis.coverage.processing.Operation, java.io.Serializable
Direct Known Subclasses:
Operation2D

public abstract class AbstractOperation
extends java.lang.Object
implements org.opengis.coverage.processing.Operation, java.io.Serializable

Provides descriptive information for a coverage processing operation. The descriptive information includes such information as the name of the operation, operation description, and number of source grid coverages required for the operation.

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

Field Summary
protected  org.opengis.parameter.ParameterDescriptorGroup descriptor
          The parameters descriptor.
 
Constructor Summary
AbstractOperation(org.opengis.parameter.ParameterDescriptorGroup descriptor)
          Constructs an operation.
 
Method Summary
protected abstract  org.opengis.coverage.Coverage doOperation(org.opengis.parameter.ParameterValueGroup parameters, Hints hints)
          Applies a process operation to a coverage.
protected static void ensureNonNull(java.lang.String name, java.lang.Object object)
          Makes sure that an argument is non-null.
 boolean equals(java.lang.Object object)
          Compares the specified object with this operation for equality.
 java.lang.String getDescription()
          Returns the description of the processing operation.
 java.lang.String getDocURL()
          Returns the URL for documentation on the processing operation.
 java.lang.String getName()
          Returns the name of the processing operation.
 int getNumSources()
          Returns the number of source coverages required for the operation.
 org.opengis.parameter.ParameterValueGroup getParameters()
          Returns an initially empty set of parameters.
protected static AbstractProcessor getProcessor(java.awt.RenderingHints hints)
          Returns the AbstractProcessor instance used for an operation.
 java.lang.String getVendor()
          Returns the vendor name of the processing operation implementation.
 java.lang.String getVersion()
          Returns the version number of the implementation.
 int hashCode()
          Returns a hash value for this operation.
 java.lang.String toString()
          Returns a string repr?sentation of this operation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

descriptor

protected final org.opengis.parameter.ParameterDescriptorGroup descriptor
The parameters descriptor.

Constructor Detail

AbstractOperation

public AbstractOperation(org.opengis.parameter.ParameterDescriptorGroup descriptor)
Constructs an operation. The operation name will be the same than the parameter descriptor name.

Parameters:
descriptor - The parameters descriptor.
Method Detail

getName

public java.lang.String getName()
Returns the name of the processing operation. The default implementation returns the descriptor code name.

Specified by:
getName in interface org.opengis.coverage.processing.Operation

getDescription

public java.lang.String getDescription()
Returns the description of the processing operation. If there is no description, returns . The default implementation returns the descriptor remarks.

Specified by:
getDescription in interface org.opengis.coverage.processing.Operation

getDocURL

public java.lang.String getDocURL()
Returns the URL for documentation on the processing operation. If no online documentation is available the string will be null. The default implementation returns .

Specified by:
getDocURL in interface org.opengis.coverage.processing.Operation

getVersion

public java.lang.String getVersion()
Returns the version number of the implementation.

Specified by:
getVersion in interface org.opengis.coverage.processing.Operation

getVendor

public java.lang.String getVendor()
Returns the vendor name of the processing operation implementation. The default implementation returns "Geotools 2".

Specified by:
getVendor in interface org.opengis.coverage.processing.Operation

getNumSources

public int getNumSources()
Returns the number of source coverages required for the operation.

Specified by:
getNumSources in interface org.opengis.coverage.processing.Operation

getParameters

public org.opengis.parameter.ParameterValueGroup getParameters()
Returns an initially empty set of parameters.

Specified by:
getParameters in interface org.opengis.coverage.processing.Operation

doOperation

protected abstract org.opengis.coverage.Coverage doOperation(org.opengis.parameter.ParameterValueGroup parameters,
                                                             Hints hints)
Applies a process operation to a coverage. This method is invoked by DefaultProcessor.

Parameters:
parameters - List of name value pairs for the parameters required for the operation.
hints - A set of rendering hints, or if none. The may provides hints for the following keys: Hints.COORDINATE_OPERATION_FACTORY and Hints.JAI_INSTANCE.
Returns:
The result as a coverage.

getProcessor

protected static AbstractProcessor getProcessor(java.awt.RenderingHints hints)
Returns the AbstractProcessor instance used for an operation. The instance is fetch from the rendering hints given to the doOperation(org.opengis.parameter.ParameterValueGroup, org.geotools.factory.Hints) method. If no processor is specified, then a default one is returned.

Parameters:
hints - The rendering hints, or if none.
Returns:
The instance in use (never ).

ensureNonNull

protected static void ensureNonNull(java.lang.String name,
                                    java.lang.Object object)
                             throws java.lang.IllegalArgumentException
Makes sure that an argument is non-null. This is a convenience method for implementations in subclasses.

Parameters:
name - Argument name.
object - User argument.
Throws:
java.lang.IllegalArgumentException - if is null.

hashCode

public int hashCode()
Returns a hash value for this operation. This value need not remain consistent between different implementations of the same class.


equals

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


toString

public java.lang.String toString()
Returns a string repr?sentation of this operation. The returned string is implementation dependent. It is usually provided for debugging purposes only.



Copyright © GeoTools. All Rights Reserved.