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:
annotationif explicitly set (the default is none).codenameremark
Other attributes (isSectionHeader, isDeprecated and hasError)
are not directly written in the table, but affect their styling.
- Since:
- 3.1
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptioncharThe authority code in HTML.booleantrueif an exception occurred while creating the identified object.booleantrueif this authority code is deprecated, orfalseotherwise.booleantrueif this row should actually be used as a section header.The object name in HTML, ornullif none.A remark in HTML to display after the name, ornullif none. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompares 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, ornullif 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, ornullif 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
FactoryExceptionlocalized 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
trueif this row should actually be used as a section header. Users can insert rows with this flag set totrueif they wish to split the large table is smaller sections. -
isDeprecated
trueif this authority code is deprecated, orfalseotherwise. -
hasError
-
-
Constructor Details
-
Row
public Row()Creates a new row with all fields initialized tonullorfalse.
-
-
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:
compareToin 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
-