| java.lang.Object org.geotools.coverage.processing.AbstractProcessor
All known Subclasses: org.geotools.coverage.processing.DefaultProcessor, org.geotools.coverage.processing.BufferedProcessor,
AbstractProcessor | abstract public class AbstractProcessor (Code) | | Base class for
processor implementations.
since: 2.2 version: $Id: AbstractProcessor.java 27862 2007-11-12 19:51:19Z desruisseaux $ author: Martin Desruisseaux |
Field Summary | |
final public static Logger | LOGGER The logger for coverage processing operations. | final public static Level | OPERATION The logging level for reporting coverage operations. |
Method Summary | |
abstract public Coverage | doOperation(ParameterValueGroup parameters) Applies an operation.
Parameters: parameters - Parameters required for the operation. | static void | ensureNonNull(String name, Object object) Makes sure that an argument is non-null. | public static synchronized AbstractProcessor | getInstance() Returns a default processor instance. | public Locale | getLocale() The locale for logging message or reporting errors. | abstract public Operation | getOperation(String name) Returns the operation for the specified name.
Parameters: name - Name of the operation. | static String | getOperationName(ParameterValueGroup parameters) Returns the operation name for the specified parameters. | abstract public Collection | getOperations() Retrieves grid processing operations information. | static Coverage | getPrimarySource(ParameterValueGroup parameters) Returns the primary source coverage from the specified parameters, or
null if none. | public void | listOperations(Writer out) Lists a summary of all operations to the specified stream. | final void | log(Coverage source, Coverage result, String operationName, boolean fromCache) Logs a message for an operation. | public static void | main(String[] args) Dumps to the
a list of operations for the
default processor. | public void | printOperations(Writer out, String[] names) Prints a description of operations to the specified stream. | void | setAsDefault() Notifies this processor that it is going to be used as the application-wide default
processor. |
LOGGER | final public static Logger LOGGER(Code) | | The logger for coverage processing operations.
|
OPERATION | final public static Level OPERATION(Code) | | The logging level for reporting coverage operations.
This level is equals or slightly lower than
Level.INFO .
|
AbstractProcessor | public AbstractProcessor()(Code) | | Constructs a coverage processor.
|
doOperation | abstract public Coverage doOperation(ParameterValueGroup parameters) throws OperationNotFoundException(Code) | | Applies an operation.
Parameters: parameters - Parameters required for the operation. The result as a coverage. throws: OperationNotFoundException - if there is no operation for the parameter group name. |
getInstance | public static synchronized AbstractProcessor getInstance()(Code) | | Returns a default processor instance.
Note: this is a temporary method, until we have GeoAPI interface for
coverage processor and a factory finder for their implementations.
|
getLocale | public Locale getLocale()(Code) | | The locale for logging message or reporting errors. The default implementations
returns the
. Subclasses can override
this method if a different locale is wanted.
|
getOperation | abstract public Operation getOperation(String name) throws OperationNotFoundException(Code) | | Returns the operation for the specified name.
Parameters: name - Name of the operation. The operation for the given name. throws: OperationNotFoundException - if there is no operation for the specified name. |
getOperationName | static String getOperationName(ParameterValueGroup parameters)(Code) | | Returns the operation name for the specified parameters.
|
getOperations | abstract public Collection getOperations()(Code) | | Retrieves grid processing operations information. Each operation information contains
the name of the operation as well as a list of its parameters.
|
getPrimarySource | static Coverage getPrimarySource(ParameterValueGroup parameters)(Code) | | Returns the primary source coverage from the specified parameters, or
null if none.
|
listOperations | public void listOperations(Writer out) throws IOException(Code) | | Lists a summary of all operations to the specified stream.
Parameters: out - The destination stream. throws: IOException - if an error occured will writing to the stream. |
log | final void log(Coverage source, Coverage result, String operationName, boolean fromCache)(Code) | | Logs a message for an operation. The message will be logged only if the source grid
coverage is different from the result (i.e. if the operation did some work).
Parameters: source - The source grid coverage. Parameters: result - The resulting grid coverage. Parameters: operationName - the operation name. Parameters: fromCache - true if the result has been fetch from the cache. |
main | public static void main(String[] args)(Code) | | Dumps to the
a list of operations for the
default processor. If no argument is provided, then only a summary of operations is printed.
If arguments are provided, then the operation parameters are printed for all operation names
given in arguments. This method can been invoked from the command line. For example:
java org.geotools.coverage.processing.DefaultProcessor Interpolate
Note for Windows users: If the output contains strange
symbols, try to supply an "
-encoding " argument. Example:
java org.geotools.coverage.processing.DefaultProcessor -encoding Cp850
The codepage number (850 in the previous example) can be fetch from the DOS
command line by entering the "
chcp " command with no arguments.
|
printOperations | public void printOperations(Writer out, String[] names) throws OperationNotFoundException, IOException(Code) | | Prints a description of operations to the specified stream. If the
names array
is non-null, then only the specified operations are printed. Otherwise, all operations
are printed. The description details include operation names and lists of parameters.
Parameters: out - The destination stream. Parameters: names - The operation to print, or an empty array for none, or null for all. throws: IOException - if an error occured will writing to the stream. throws: OperationNotFoundException - if an operation named in names was not found. |
setAsDefault | void setAsDefault()(Code) | | Notifies this processor that it is going to be used as the application-wide default
processor.
|
|
|