| Author | Topic |
Posts: 273
Registered: June 2006
|
|
User objects on JSBML data structures
|
12 Mar '12 10:07
|
 |
|
Dear all,
On the last COMBINE meeting in Heidelberg, we agreed that ASTNode should
have user objects to allow people doing numerical calculations with
JSBML to store some intermediate results in order to reduce their
computation time. This has already been implemented and works nicely.
Now, I wonder why we limited this to ASTNode. In my opinion it would be
very nice if every node in an SBML data structure could be equipped with
a user-defined Object. So, I propose to have a set/getUserObject method
on AbstractTreeNode.
Why could this be helpful? The modules of JSBML would already benefit
from such a construct. We have a module that synchronizes SBML elements
between JSBML and libSBML. Another module does the same thing for
CellDesigner. Maybe we will soon have something similar for other
end-user applications as well. In some cases, however, it is really
difficult to identify a corresponding element in a different model data
structure. Imagine, you have a model in JSBML and a corresponding model
that is a libSBML data structure with Java binding. Now, your
TreeNodeChangeListener gets notified that there is a change of the
variable field in a certain RateRule. Due to the fact that a RateRule
doesn't have an id, it then becomes very difficult to identify the
corresponding RateRule in this other data structure, hence
synchronization between two data structures is sometimes very hard to
do, if not even impossible in some cases.
If we would allow to store some user-defined object in every SBML node,
it would become possible to directly store a mapping between JSBML and
other data sources. There could also be other use cases, in which this
could be useful.
Whenever during numerical calculation or conversion of some data
structures it is necessary to temporarily save additional information,
it would be nice to simply say mySBase.setUserObject(myDataStructure);
What do other people think about this proposal?
Cheers
Andreas
--
Dr. Andreas Dräger
University of Tuebingen
Center for Bioinformatics Tuebingen (ZBIT)
Sand 1
72076 Tübingen
Germany
Phone: +49-7071-29-78982
Fax: +49-7071-29-5091
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
|