You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by "Martin Desruisseaux (JIRA)" <ji...@apache.org> on 2013/03/21 23:05:15 UTC

[jira] [Created] (SIS-87) Provide copy constructors in metadata objects

Martin Desruisseaux created SIS-87:
--------------------------------------

             Summary: Provide copy constructors in metadata objects
                 Key: SIS-87
                 URL: https://issues.apache.org/jira/browse/SIS-87
             Project: Spatial Information Systems
          Issue Type: Improvement
          Components: Metadata
            Reporter: Martin Desruisseaux
            Assignee: Martin Desruisseaux
             Fix For: 0.3


Every subclass of {{ISOMetadata}} should provide a copy constructor. Problem is that those copy constructors are very tedious to write. The {{shallowCopy(Object)}} method working with Java reflection has been created for making that easier. However {{shallowCopy}} can not be invoked from the constructor (actually it can, but this is dangerous because {{shallowCopy}} invokes in turn overrideable methods before the subclasses have been initialized).

This task can be subdivided in the following sub-tasks:

* Write a small program generating most of the copy constructor code automatically.
* Write a small program generating most of the test code automatically (probably the same program in a modified form).
* Update all {{castOrCopy}} methods to use the new copy constructor.
* Transform the {{shallowCopy}} method into an {{append}} method, which may be more useful. The difference would be that new items are added into existing collections instead than overwriting the previous ones.


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