Martin Desruisseaux created SIS-116:
---------------------------------------

             Summary: Support gco:uuid and href on primitive types
                 Key: SIS-116
                 URL: https://issues.apache.org/jira/browse/SIS-116
             Project: Spatial Information Systems
          Issue Type: Improvement
          Components: Metadata
    Affects Versions: 0.3
            Reporter: Martin Desruisseaux
            Priority: Minor


Metadata objects can specified {{gco:uuid}}, {{xlink:href}} and similar 
attributes by implementing the {{org.apache.sis.xml.IdentifiedObject}} 
interface. However we can not do that for JDK final classes like {{Integer}} 
and {{String}}. This is a problem similar to the one described in SIS-115 
({{NilReason}} for primitive types) and may be solved in a similar way. We have 
not yet solved this problem because the use case for {{gco:uuid}} or 
{{xlink:href}} attributes on elements as small as {{Integer}} or {{String}} are 
unclear at this stage.

If nevertheless the above-cited support for identifiers is needed, then we 
could proceed as below:

* In {{org.apache.sis.internal.jaxb.gco.PropertyType}}, complete the 
{{PropertyType(BoundType value, boolean mayBeNil)}} constructor in order to 
check for {{XLink}} and {{UUID}} in addition to {{NilReason}}.
* Search usages of the above constructor. Conditions like {{value.intValue() == 
0}} may need to be removed.
* We may need to provide a special implementation of 
{{org.apache.sis.xml.IdentifierMap}} which delegate its work to the 
{{org.apache.sis.internal.jaxb.PrimitiveTypeProperties}} static methods.
* We may need to provide some static method (location to be determined) 
returning an {{IdentifierMap}} for a given {{Object}}, something similar to 
what we currently have in {{NilReason.forObject(Object)}}.


--
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

Reply via email to