Andreas Draeger wrote:
> Am 31.03.2011 10:42, schrieb Nicolas Rodriguez:
>> Dinasarapu, Ashok reddy wrote:
>>> Hi Andreas,
>>> I am sending you the file that I have to parse to get the required data.
>> The problem is that we use the class LocalParameter, for all level and
>> version of SBML, for the local parameter of a reaction.
>> And this class as no constant attribute, like in SBML level 3. However,
>> the constant attribute was always set to true for local parameter.
> Yes. But as far as I know, there was never the possibility to change the
> constant attribute of a local parameter to something else than true.
>> One simple fix is to add a check for the constant attribute in the
>> readAttribute method of LocalParameter and return true there to tell
>> the main parser that the attribute is recognized. We can check there
>> that the value is always true by the way, and send a warning if it is not.
> Hm, yes... but, we should only return true there if the value associated
> to the constant attribute is also true. This means, if the readAttribute
> method receives "constant" and "false" it should return false.
> Furthermore, this may only be done for Level < 3. Otherwise, this
> attribute is not recognized.
Of course, that was what I was suggesting without writing it :-)
>> One question is, do we want to write back the constant attribute to keep
>> the file as it was ?? If yes, we probably need to add a class attribute
>> to tell us if the constantAttribute was set and then add it in the
>> writeAttribute method.
> It does not really make sense to write "constant=true" in a local
> parameter with Level < 3, because by default this is always the case. No
> matter what was written in an original file, I would remove this in any
There is nothing wrong to put the attribute to true, like this, you are
sure that other software that use your SBML file
will set the attribute to true even if they do not know the default
value that is written in the SBML specs.
But also, it is nice to give back the model as it was written by the
user or the tool that created it. This is why we are doing that for all
attributes in all the other classes that have a default value in the
specs. If the user set it in the original file, we are writing it back
even if it is the default value.
Not sure why we should make an exception for the constant attribute in
the class parameter.
To manage your jsbml-development list subscription, visit
For a web interface to the jsbml-development mailing list, visit
For questions or feedback about the jsbml-development list,