org.primordion.cellontro.io.sbml
Class Cellontro2Sbml

java.lang.Object
  extended byorg.primordion.cellontro.io.sbml.Cellontro2Sbml
All Implemented Interfaces:
ICellontro2Sbml

public class Cellontro2Sbml
extends java.lang.Object
implements ICellontro2Sbml

Cellontro2Sbml transforms Xholon runtime models into SBML Level 2 files. The exported file contains SBML compartments, species, and reactions.

TODO Do a better job of exporting partial Cellontro models to SBML. For partial models, create an external compartment that's the actual root compartment. Any species references that are outside the subtree being exported will have this as their compartment. To implement this, possibly store species in a temporary data structure first, so that additional external species can be added while processing the reactions.

TODO Be able to export the kinetics, in addition to the structure.

TODO [February 19, 2007] Be able to export models that only implement IXholon and IXholonClass, rather than requiring that they implement the interface extensions IBioXholon and IBioXholonClass. The following incompatible methods are used in Cellontro2Sbml: getPheneVal() isReversible() getNumReactants() getNumProducts() getNumModifiers() IBioXholonClass.SIZE_ARRAY_GENEVAL

Since:
0.2 (Created on December 11, 2005)
Author:
Ken Webb

Constructor Summary
Cellontro2Sbml()
          Constructor.
Cellontro2Sbml(java.lang.String sbmlFileName, java.lang.String modelName, IXholon root)
          Constructor.
 
Method Summary
 boolean initialize(java.lang.String sbmlFileName, java.lang.String modelName, IXholon root)
          Initialize.
 void writeAll()
          Write out all parts of the SBML file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cellontro2Sbml

public Cellontro2Sbml()
Constructor.


Cellontro2Sbml

public Cellontro2Sbml(java.lang.String sbmlFileName,
                      java.lang.String modelName,
                      IXholon root)
Constructor.

Parameters:
sbmlFileName - Name of the output SBML XML file.
modelName - Name of the model.
root - Root of the tree that will be written out.
Method Detail

initialize

public boolean initialize(java.lang.String sbmlFileName,
                          java.lang.String modelName,
                          IXholon root)
Description copied from interface: ICellontro2Sbml
Initialize.

Specified by:
initialize in interface ICellontro2Sbml
Parameters:
sbmlFileName - Name of the output SBML file.
modelName - Name of the model.
root - Root of the composite structure hierarchy to write out.
Returns:
Whether or not the initialization succeeded. If it failed, it is probably because this is not a Cellontro application.

writeAll

public void writeAll()
Description copied from interface: ICellontro2Sbml
Write out all parts of the SBML file.

Specified by:
writeAll in interface ICellontro2Sbml