Martin Desruisseaux created SIS-82:
--------------------------------------
Summary: Metadata implementations could use a single field for
union
Key: SIS-82
URL: https://issues.apache.org/jira/browse/SIS-82
Project: Spatial Information Systems
Issue Type: Improvement
Components: Metadata
Reporter: Martin Desruisseaux
Fix For: 0.3
The ISO 19115 specification defines some properties as conditional. Most of the
time, they are a set of mutually exclusive properties. For example the
{{MD_Resolution}} class defines two properties: {{equivalentScale}} and
{{distance}}, both of them flagged as conditional. The specification said:
"_Only one of equivalent scale and ground sample distance may be provided_".
Currently those two properties are defined in separated fields and could be
defined together. We could replace the two private fields by a single private
{{Object}} field, and use {{instanceof}} check in getter methods. The advantage
would be:
* Automatically gain enforcement of the ISO specification.
* Save a little bit of memory space for metadata instances.
One consequence is that if an XML document contains two properties, the last
property would silently overwrite the previous one at unmarshalling time. To
prevent such thing to happen silently, we would need the {{APPENDABLE}} mode
proposed in SIS-81.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira