sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SIS-144) Metadata properties ignore orderering declared in parent classes
Date Wed, 30 Oct 2013 10:26:25 GMT

     [ https://issues.apache.org/jira/browse/SIS-144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Martin Desruisseaux updated SIS-144:
------------------------------------

    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:

{noformat:title=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
{noformat}

{noformat:title=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
{noformat}


  was:
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.



> Metadata properties ignore orderering declared in parent classes
> ----------------------------------------------------------------
>
>                 Key: SIS-144
>                 URL: https://issues.apache.org/jira/browse/SIS-144
>             Project: Spatial Information Systems
>          Issue Type: Bug
>          Components: Metadata
>    Affects Versions: 0.3
>            Reporter: Martin Desruisseaux
>            Assignee: Martin Desruisseaux
>            Priority: Minor
>             Fix For: 0.4
>
>
> 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:
> {noformat:title=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
> {noformat}
> {noformat:title=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
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message