Class OperationParametersReport.Row
- Object
-
- Row
-
- All Implemented Interfaces:
Comparable<OperationParametersReport.Row>
- Enclosing class:
- OperationParametersReport
protected static class OperationParametersReport.Row extends Object implements Comparable<OperationParametersReport.Row>
A single row in the table produced byOperationParametersReport
. Instances of this class are created by theOperationParametersReport.createRow(…)
method. Subclasses ofOperationParametersReport
can override that methods in order to modify the content of a row.Every
String
fields in this class can contain HTML elements, especially the names values. If some text is expected to print<
or>
characters, then those characters need to be escaped to their HTML entities.- Since:
- 3.1
- See Also:
OperationParametersReport.createRow(IdentifiedObject, ParameterDescriptorGroup, Set)
-
-
Field Summary
Fields Modifier and Type Field Description String
category
An optional user category, ornull
if none.Map<String,String[]>
names
The names or aliases to write on the table row.List<OperationParametersReport.Row>
parameters
The operation parameters or the parameter sub-groups, ornull
if not applicable.
-
Constructor Summary
Constructors Constructor Description Row(IdentifiedObject object, Set<String> codeSpaces)
Creates a row to be show on the HTML page.Row(OperationParametersReport.Row toCopy)
Creates a new row initialized to a shallow copy of the given row.
-
Method Summary
Modifier and Type Method Description int
compareTo(OperationParametersReport.Row o)
Compares this row with the given object for order.String
toString()
Returns a string representation of this row, for debugging purpose only.
-
-
-
Field Detail
-
category
public String category
An optional user category, ornull
if none. If non-null, this category will be formatted as a single row in the HTML table before all subsequentRow
instances of the same category.The default value is
null
in every cases. Subclasses ofOperationParametersReport
can modify this value in order to classify operations by category. For example subclasses may use this value for classifyingOperationMethod
instances according the kind of map projection (planar, cylindrical, conic).
-
names
public final Map<String,String[]> names
The names or aliases to write on the table row. Each entry will be formatted in a single table cell. The column of the cell is determined by the key, and the content is determined by the value. More specifically:- Map keys are the code spaces or scopes of the name or aliases.
- Map values are the codes or string representations of the name or aliases.
The values may contain HTML elements. In particular:
<em>…</em>
for primary names.<del>…</del>
for deprecated objects (need to be added by the user).
-
parameters
public List<OperationParametersReport.Row> parameters
The operation parameters or the parameter sub-groups, ornull
if not applicable. If this row describes an operation, then the content of this list is derived from the values returned byParameterDescriptorGroup.descriptors()
. If this row describes a parameter, then this list will contain the sub-groups (if any).Note: subgroups are not yet supported.
-
-
Constructor Detail
-
Row
public Row(IdentifiedObject object, Set<String> codeSpaces)
Creates a row to be show on the HTML page.- Parameters:
object
- the operation or parameter to show on the HTML page.codeSpaces
- the code spaces for which to get the name and aliases.
-
Row
public Row(OperationParametersReport.Row toCopy)
Creates a new row initialized to a shallow copy of the given row. TheMap
andList
collections are copied, but the content of those collections are not cloned.- Parameters:
toCopy
- the row to copy.
-
-
Method Detail
-
compareTo
public int compareTo(OperationParametersReport.Row o)
Compares this row with the given object for order. This method is used for sorting the operations in the order to be show on the HTML output page.The default implementation compare that category first - this is needed in order to ensure that operations of the same category are grouped. Then, this method compares object names components in the following order: code, code space and version.
Subclasses can override this method if they want a different ordering on the HTML page.
- Specified by:
compareTo
in interfaceComparable<OperationParametersReport.Row>
- Parameters:
o
- the other row to compare with this row.- Returns:
- -1 if
this
should appears beforeo
, -1 for the converse, or 0 if this method can not determine an ordering for the given object.
-
-