Package org.opengis.test.report
Class AuthorityCodesReport.Row
Object
Row
- All Implemented Interfaces:
Comparable<AuthorityCodesReport.Row>
- Enclosing class:
AuthorityCodesReport
protected static class AuthorityCodesReport.Row
extends Object
implements Comparable<AuthorityCodesReport.Row>
A single row in the table produced by
AuthorityCodesReport
. Instances of this class are created by the
AuthorityCodesReport.createRow(…)
methods.
Subclasses of AuthorityCodesReport
can override those methods in order to modify the content of a row.
Every String
fields in this class must be valid HTML. If some text is expected to print
<
or >
characters, then those characters need to be escaped to their HTML entities.
Content of each Row
instance is written in the following order:
annotation
if explicitly set (the default is none).code
name
remark
Other attributes (isSectionHeader
, isDeprecated
and hasError
)
are not directly written in the table, but affect their styling.
- Since:
- 3.1
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionchar
The authority code in HTML.boolean
true
if an exception occurred while creating the identified object.boolean
true
if this authority code is deprecated, orfalse
otherwise.boolean
true
if this row should actually be used as a section header.The object name in HTML, ornull
if none.A remark in HTML to display after the name, ornull
if none. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Compares this row with the given one for order.toString()
Returns a string representation of this row, for debugging purpose only.
-
Field Details
-
code
-
name
The object name in HTML, ornull
if none. By default, this field is set to the value ofIdentifiedObject.getName().getCode()
.Users can override
AuthorityCodesReport.createRow(String, IdentifiedObject)
if they wish to change the value of this field. -
remark
A remark in HTML to display after the name, ornull
if none. By default, this field is set to one of the following values:- If the object creation was successful, the
IdentifiedObject.getRemarks()
localized to the report locale. - Otherwise, the
FactoryException
localized message.
Users can override
AuthorityCodesReport.createRow(String, IdentifiedObject)
orAuthorityCodesReport.createRow(String, FactoryException)
if they wish to change the value of this field. - If the object creation was successful, the
-
annotation
-
isSectionHeader
true
if this row should actually be used as a section header. Users can insert rows with this flag set totrue
if they wish to split the large table is smaller sections. -
isDeprecated
true
if this authority code is deprecated, orfalse
otherwise. -
hasError
-
-
Constructor Details
-
Row
public Row()Creates a new row with all fields initialized tonull
orfalse
.
-
-
Method Details
-
compareTo
Compares this row with the given one for order. The default implementation splits the code spaces (or scopes) from the codes using the":"
separator, then compares each elements. This method tries to compare the elements as numeric values if possible (i.e. 4326 is less than 27561). If the codes cannot be compared as numerical values, then they are compared as strings using a case-insensitive comparator.Subclasses can override this method if they want a different rows ordering.
- Specified by:
compareTo
in interfaceComparable<AuthorityCodesReport.Row>
- Parameters:
o
- the other row to compare with this row.- Returns:
- -1 for sorting this row before the given row, +1 for sorting it after, or 0 if the two rows have equal ordering.
-
toString
-