| Author | Topic |
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
jsbml - LayoutParser
|
02 Aug '11 07:19
|
 |
|
> I continue the implementation of the class LayoutParser currently.
> I have a suggestion for changing the parsing-process of "SBMLCoreParser".
> First i describe the problem:
> To use the Layout-Extension easier we have to bind the Layout-Elements
> to the SBML-Core-Elements.
> For instance: Binding of a speciesGlyphObj with speciesObj with the
> command
> speciesObj.addExtention(("http://www.sbml.org/sbml/level3/version1/layout/version1
> <http://www.sbml.org/sbml/level3/version1/layout/version1>",
> speciesGlyphObj).
> The user can then get the speicesGlyphObj with the command:
> speciesObj.getExtention("http://www.sbml.org/sbml/level3/version1/layout/version1
> <http://www.sbml.org/sbml/level3/version1/layout/version1>");
>
> The class LayoutParser is used at the beginning of the parsing
> process. After parsing the layout-information the "SBMLCoreParser"
> will create the "Species" objects.
> So the "LayoutParser" can not bind the speciesGlyphs-Objects to the
> species-Objects.
>
> This problem occurs for every extension we want to implement. The
> easiest way to manage the problem is to parse all Annotation-Tags at
> the end of parsing the SBML-Core-Elements.
>
For that, you have to use the processEndDocument methods of the
ReadingParser interface.
see
http://jsbml.svn.sourceforge.net/viewvc/jsbml/trunk/src/org/sbml/jsbml/xml/parsers/ReadingParser.java?revision=750&view=markup
The best is to create a HashMap or what you like to store the
SpeciesGlyph object you are creating and then in the
processEndDocument() method,
the XML document is finished reading and all the objects should be
created, you can associate the SpeciesGlyph with the Species.
It should work fine, I don't think there is any need to change anything,
if I unsderstodd correctly your problem.
Nico
ps: replying before the mail got to the list :-)
I can see mails that are being moderated but cannot accept them
____________________________________________________________
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
|
|
|