<eventAssignment metaid="_324053" variable="kf_13">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<cn>0</cn>
</math>
</eventAssignment>
Hi Matthias,
Hi all,
Somehow when converting eventAssignments to strings via
eventAssignment.getMath().toFormula()
incorrect formulas are generated in the case of simple assignments like (p = 0).
This is a problem of the toString methods somehow.
Example attached, when calling
eventAssignment.getMath().toFormula()
on
<eventAssignment metaid="_324053" variable="kf_13"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <cn>0</cn> </math> </eventAssignment>
I expect:
kf_13 = 0
but the output is:
parameter [ id="kf_13" metaid="metaid_0000063" constant="false" sboTerm="SBO:0000035" value="1500"] = 0
There has been a general move to change the toString methods in JSBML to print only very simple things about the class and class attributes.
For classes where we thought that users might like to keep the way the toString worked before, we created some printXXX methods so that they can
be sure to get the same result as previously (like AStNode.printASTNode to get the formula). The changes to ASTNode.toString() had many side effects so we reverted
that quickly. I would have thought that the maven snapshot did
not contain this change but may be something went wrong somewhere.