Description
The toString() representation of any object from the org.apache.sis.metadata package shall format the property elements in the order they are declared in @XmlType.propOrder(). This work as expected for classes that inherit directly from ISOMetadata. However in deeper class hierarchy, only the order declaration in the leaf class is taken in account. We need to take in account the declarations in parent classes too.
An example of case where this problem is apparent is when formatting a DataIdentification object:
Ordering before the fix
Data identification ├─Spatial representation type……… Grid ├─Extent │ ├─Description……………………………………… World │ └─Geographic element │ ├─West bound longitude…… 180°W │ ├─East bound longitude…… 180°E │ ├─South bound latitude…… 90°S │ ├─North bound latitude…… 90°N │ └─Extent type code……………… true ├─Abstract………………………………………………………… NCEP SST Global 5.0 x 2.5 degree model data ├─Citation │ ├─Title……………………………………………………… Sea Surface Temperature Analysis Model │ ├─Date │ │ ├─Date……………………………………………… 2005-09-22 00:00:00 │ │ └─Date type………………………………… Creation │ └─Identifier │ └─Code……………………………………………… SST_Global.nc ├─Descriptive keywords │ ├─Keyword………………………………………………… EARTH SCIENCE > Oceans > Ocean Temperature > Sea Surface Temperature │ ├─Type………………………………………………………… Theme │ └─Thesaurus name │ └─Title…………………………………………… GCMD Science Keywords └─Resource constraints └─Use limitation……………………………… Freely available
Expected ordering
Data identification ├─Citation │ ├─Title……………………………………………………… Sea Surface Temperature Analysis Model │ ├─Date │ │ ├─Date……………………………………………… 2005-09-22 00:00:00 │ │ └─Date type………………………………… Creation │ └─Identifier │ └─Code……………………………………………… SST_Global.nc ├─Abstract………………………………………………………… NCEP SST Global 5.0 x 2.5 degree model data ├─Descriptive keywords │ ├─Keyword………………………………………………… EARTH SCIENCE > Oceans > Ocean Temperature > Sea Surface Temperature │ ├─Type………………………………………………………… Theme │ └─Thesaurus name │ └─Title…………………………………………… GCMD Science Keywords ├─Resource constraints │ └─Use limitation……………………………… Freely available ├─Spatial representation type……… Grid └─Extent ├─Description……………………………………… World └─Geographic element ├─West bound longitude…… 180°W ├─East bound longitude…… 180°E ├─South bound latitude…… 90°S ├─North bound latitude…… 90°N └─Extent type code……………… true