Package org.geotools.coverage.processing
Class AbstractOperation
- Object
-
- AbstractOperation
-
- All Implemented Interfaces:
Serializable
,Operation
- Direct Known Subclasses:
Operation2D
public abstract class AbstractOperation extends Object implements Operation, 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
- Author:
- Martin Desruisseaux (IRD)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ParameterDescriptorGroup
descriptor
The parameters descriptor.
-
Constructor Summary
Constructors Constructor Description AbstractOperation(ParameterDescriptorGroup descriptor)
Constructs an operation.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Coverage
doOperation(ParameterValueGroup parameters, Hints hints)
Applies a process operation to a coverage.boolean
equals(Object object)
Compares the specified object with this operation for equality.String
getDescription()
Returns the description of the processing operation.String
getDocURL()
Returns the URL for documentation on the processing operation.String
getName()
Returns the name of the processing operation.int
getNumSources()
Returns the number of source coverages required for the operation.ParameterValueGroup
getParameters()
Returns an initially empty set of parameters.String
getVendor()
Returns the vendor name of the processing operation implementation.String
getVersion()
Returns the version number of the implementation.int
hashCode()
Returns a hash value for this operation.String
toString()
Returns a string representation of this operation.
-
-
-
Field Detail
-
descriptor
protected final ParameterDescriptorGroup descriptor
The parameters descriptor.
-
-
Constructor Detail
-
AbstractOperation
public AbstractOperation(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 String getName()
Returns the name of the processing operation. The default implementation returns the descriptor code name.
-
getDescription
public String getDescription()
Returns the description of the processing operation. If there is no description, returnsnull
. The default implementation returns the descriptor remarks.- Specified by:
getDescription
in interfaceOperation
- Returns:
- The description of the processing operation, or
null
.
-
getDocURL
public 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 returnsnull
.
-
getVersion
public String getVersion()
Returns the version number of the implementation.- Specified by:
getVersion
in interfaceOperation
- Returns:
- The version number for the implementation, or
null
.
-
getVendor
public String getVendor()
Returns the vendor name of the processing operation implementation. The default implementation returns "Geotools 2".
-
getNumSources
public int getNumSources()
Returns the number of source coverages required for the operation.- Specified by:
getNumSources
in interfaceOperation
- Returns:
- The number of source grid coverages required for the operation.
-
getParameters
public ParameterValueGroup getParameters()
Returns an initially empty set of parameters.- Specified by:
getParameters
in interfaceOperation
- Returns:
- The parameter informations.
-
doOperation
public abstract Coverage doOperation(ParameterValueGroup parameters, Hints hints) throws CoverageProcessingException
Applies a process operation to a coverage. This method is invoked byDefaultProcessor
.- Parameters:
parameters
- List of name value pairs for the parameters required for the operation.hints
- A set of rendering hints, ornull
if none. TheDefaultProcessor
may provides hints for the following keys:Hints.COORDINATE_OPERATION_FACTORY
andHints.JAI_INSTANCE
.- Returns:
- The result as a coverage.
- Throws:
CoverageProcessingException
- if the operation can't be applied.
-
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(Object object)
Compares the specified object with this operation for equality.
-
-