|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectReport
OperationParametersReport
public class OperationParametersReport
Generates a list of operations (typically map projections) and their parameters.
The operations are described by instances of an IdentifiedObject subtype,
for example coordinates OperationMethod. Each operation can be associated
to a ParameterDescriptorGroup instance. Those elements can be
added individually
in the rows list. Alternatively, a convenience method can be used
for adding all operation methods available from a given MathTransformFactory.
This class recognizes the following property values:
| Key | Remarks | Meaning |
|---|---|---|
TITLE | Title of the web page to produce. | |
DESCRIPTION | optional | Description to write after the introductory paragraph. |
OBJECTS.KIND | Kind of objects listed in the page (e.g. "Operation Methods"). | |
PRODUCT.NAME | Name of the product for which the report is generated. | |
PRODUCT.VERSION | Version of the product for which the report is generated. | |
PRODUCT.URL | URL where more information is available about the product. | |
JAVADOC.GEOAPI | predefined | Base URL of GeoAPI javadoc. |
FILENAME | predefined | Name of the file to create if the write(File) argument is a directory. |
How to use this class:
Properties map with the values documented in the above table. Default
values exist for many keys, but may depend on the environment. It is safer to specify
values explicitly when they are known.OperationParametersReport with the above properties map
given to the constructor.add method
for each operation or factory to include in the HTML page.write(File).
| Nested Class Summary | |
|---|---|
protected static class |
OperationParametersReport.Row
A single row in the table produced by OperationParametersReport. |
| Field Summary | |
|---|---|
protected List<OperationParametersReport.Row> |
rows
The operations to publish in the HTML report. |
| Fields inherited from class Report |
|---|
properties |
| Constructor Summary | |
|---|---|
OperationParametersReport(Properties properties)
Creates a new report generator using the given property values. |
|
| Method Summary | |
|---|---|
void |
add(IdentifiedObject operation,
ParameterDescriptorGroup parameters)
Adds an operation to be show on the HTML page. |
void |
add(MathTransformFactory factory)
Convenience method adding all available methods from the given factory. |
protected OperationParametersReport.Row |
createRow(IdentifiedObject operation,
ParameterDescriptorGroup parameters,
Set<String> codeSpaces)
Creates a new row for the given operation and parameters. |
File |
write(File destination)
Formats the current content of the rows list as a HTML page in the given file. |
| Methods inherited from class Report |
|---|
getLocale, progress |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final List<OperationParametersReport.Row> rows
add(IdentifiedObject, ParameterDescriptorGroup),
add(MathTransformFactory)| Constructor Detail |
|---|
public OperationParametersReport(Properties properties)
properties - The property values, or null for the default values.| Method Detail |
|---|
public void add(IdentifiedObject operation,
ParameterDescriptorGroup parameters)
operation.createRow(…) with the above set. This means that
any parameter names defined in an other scope will be ignored.
operation - The operation to show on the HTML page.parameters - The operation parameters, or null if none.public void add(MathTransformFactory factory)
add(method, method.getParameters());
factory - The factory for which to add available methods.
protected OperationParametersReport.Row createRow(IdentifiedObject operation,
ParameterDescriptorGroup parameters,
Set<String> codeSpaces)
add(…) method when a new row
needs to be created, either for an operation or for one of its parameters.
The default implementation instantiate a new OperationParametersReport.Row with the given operation and
code spaces. Then, if the given parameters argument is non-null, this method
iterates over all parameter descriptor and invokes this method recursively for creating
their rows.
operation - The operation.parameters - The operation parameters, or null if none.codeSpaces - The code spaces for which to get the name and aliases.
null if none.
public File write(File destination)
throws IOException
write in class Reportdestination - The file to generate.
destination file.
IOException - If an error occurred while writing the report.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||