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 byAuthorityCodesReport. Instances of this class are created by theAuthorityCodesReport.createRow(…)methods. Subclasses ofAuthorityCodesReportcan override those methods in order to modify the content of a row.Every
Stringfields 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
Rowinstance is written in the following order:annotationif explicitly set (the default is none).codenameremark
Other attributes (
isSectionHeader,isDeprecatedandhasError) are not directly written in the table, but affect their styling.
-
-
Field Summary
Fields Modifier and Type Field Description charannotationStringcodeThe authority code in HTML.booleanhasErrortrueif an exception occurred while creating the identified object.booleanisDeprecatedtrueif this authority code is deprecated, orfalseotherwise.booleanisSectionHeadertrueif this row should actually be used as a section header.StringnameThe object name in HTML, ornullif none.StringremarkA remark in HTML to display after the name, ornullif none.
-
Constructor Summary
Constructors Constructor Description Row()Creates a new row with all fields initialized tonullorfalse.
-
Method Summary
Modifier and Type Method Description intcompareTo(AuthorityCodesReport.Row o)Compares this row with the given one for order.StringtoString()Returns a string representation of this row, for debugging purpose only.
-
-
-
Field Detail
-
name
public String 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
public String 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
public char annotation
-
isSectionHeader
public boolean 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
public boolean isDeprecated
trueif this authority code is deprecated, orfalseotherwise.
-
-
Constructor Detail
-
Row
public Row()
Creates a new row with all fields initialized tonullorfalse.
-
-
Method Detail
-
compareTo
public int compareTo(AuthorityCodesReport.Row o)
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 can not 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.
-
-