Implementation Notes
Current plug-in version is 0.7.0. It supports SBML level 1 version 1 format.
Some features of SBML format are not supported yet:
- rules - rules are ignored yet, some rules support will be available at BioUML version 0.7.5;
- unit list - plug-in ignore unit list, however it supports units declaration for species, compartment and kinetic law;
- annotations - plug-in does not support annotations provided by other software.
Further details:
| Class | | Brief description |
| Classes to read/write SBML model |
SbmlConstants | | constants declaration for elements and attributes used in SBML format. Also declares constants |
SbmlSupport | | common utility methods to log errors, parse formulas, process xhtml notes as text |
SbmlDiagramReader | | Reads SBML model from file and maps its content into biouml.model.Diagram |
SbmlDiagramWriter | | Writes biouml.model.Diagram into file in SBML format. |
| SBML module and diagram type |
SbmlModuleType | | Special module type for SBML models. |
SbmlDiagramType | | Special diagram type for SBML models. The diagram type defines SbmlDiagramViewBuilder and SbmlSemanticController. |
SbmlDiagramViewBuilder | | Builds the diagram view. |
SbmlSemanticController | | Validates user input during the diagram editing. |
CreateDiagramElementDialog | | Dialog to create new compartment or specie. |
Specie | | Special type to wrap SBML specie concept. |
SpecieBeanInfo | | BeanInfo for Specie class. |
| Utility classes |
SbmlDiagramTransformer | | Utility class to read/write SBML model from BioUML repository. |
MessageBundle | | Error mesages, messages for module and diagram type BeanInfos. |

SbmlModuleType
While SBML stores all information in diagram files, so DATA and METADATA directory absents and category issues are not supported.
Module type allows to create new empty module for SBML models using createModule method.
SbmlDiagramType
SBML diagram type is very similar with BioUML standard pathway simulation diagram type. This allow us to reuse biouml.standard.diagram.PathwayDiagramViewBuilder as well as use MATLAB plug-in for model simulation and result visualisation.
Possible node types:
biouml.standard.type.Stub - TYPE_COMPARTMENT biouml.plugins.sbml.Specie - TYPE_MOLECULE, TYPE_GENE, TYPE_RNA, TYPE_PROTEIN biouml.standard.type.Reaction - TYPE_REACTION
Possible edge types:
biouml.standard.type.SpecieReference
We define specie class in SBML plug-in to process specie concept, while we are using standard BioUML data types for compartment and reaction concepts. However they have some additional fields, for example literature references and database references. Information from these fields will be lost during storing into SBML format. Latter we can define biouml.plugins.sbml.Compartment and biouml.plugins.sbml.Reaction.
SbmlDiagramViewBuilder
It extends biouml.standard.diagram.PathwayDiagramViewBuilder. Currently it does not defines any new functionality. It reserved for future if we will change graphic notation for SBML diagrams.

BioUML meta model describes biological system using three levels, thus information from one SBML element can be splitted to three BioUML objects:
- diagram element (package
biouml.model) - data kernel (package
biouml.standard.type) - mathematical role (package
biouml.model.dynamics)
Tables below summarizes mapping of SBML elements and they attributes into BioUML classes and they properties.
SBML model elements and attributes level 1 version 1 | BioUML classes and their properties version 0.7.0 |
<model> | biouml.model.Diagram diagramType = biouml.plugin.sbml.SbmlDiagramType name = model file name biouml.standard.type.DiagramInfo biouml.model.dynamics.EModel |
name | diagram.title |
<notes> | DiagramInfo.description |
<annotations> <biouml:compartmentInfo> | diagram.location diagram.shapeSize diagram.shapeType diagram.shapeColor |
<listOfUnitDefinitions> | not supported yet |
<unitDefinition> | not supported yet |
<listOfCompartments> | diagram or compartment data collection elements |
<compartment> | biouml.model.Compartment biouml.standard.type.Stub biouml.model.dynamics.Variable |
name | compartment.name stub.name |
volume | variable.initialValue |
units | variable.units |
outside | compartment.origin, copmartment.parent |
<notes> | compartment.comment |
<annotations> <biouml:compartmentInfo> | compartment.title compartment.location compartment.shapeSize compartment.shapeType compartment.shapeColor |
<listOfSpecies> | compartment data collection elements |
<specie> | biouml.model.Node biouml.standard.type.Specie biouml.model.dynamics.Variable |
name | node.name specie.name |
compartment | node.origin |
initialAmount | variable.initialValue |
units | variable.units |
boundaryCondition | variable.boundaryCondition |
notes | compartment.comment |
charge | specie.charge |
<notes> | node.comment |
<annotations> <biouml:nodeInfo> | node.title node.location node.iamgeDescriptor |
<listOfParameters> | biouml.model.dynamics.EModel.constants |
<parameter> | biouml.model.dynamics.Constant |
name | constant.name |
value | constant.value |
units | constant.units |
<notes> | constant.comment |
<annotations> | not used |
<listOfRules> | will be supported in version 0.7.6 |
<rule> | will be supported in version 0.7.6 |
<listOfReactions> | compartment data collection elements |
<reaction> | biouml.model.Node biouml.standard.type.Reaction biouml.model.dynamics.Equation equation.variable = "$$rateOf" + reactionName equation formula - delegated by KineticLaw |
name | node.name reaction.name |
reversible | reaction.reversible |
fast | reaction.fast |
<notes> | node.comment |
<annotations> <biouml:nodeInfo> | node.title node.location node.iamgeDescriptor |
<listOfReactants> | reaction data collection elements specieReference.type = REACTANT or MODIFIER |
<listOfProducts> | reaction data collection elements specieReference.type = PRODUCT |
<specieReference> | biouml.model.Edge biouml.standard.type.SpecieReference biouml.model.dynamics.Equation equation formula - delegated by SpecieReference |
specie | edge.name = reactionName:specie as type reference.name = reactionName:specie as type reference.title = specie reference.specie = specie |
stoichiometry | reference.stoichiometry |
denominator | reference.denominator |
<notes> | reference.comment |
<annotations> <biouml:edgeInfo> | edge.title edge.inPort edge.outPort |
reversible | reaction.reversible |
<kineticLaw> | biouml.standard.KineticLaw (reaction.kineticLaw) |
formula | kineticLaw.formula |
timeUnits | kineticLaw.timeInits |
substanceUnits | kineticLaw.substanceUnits |
<notes> | kineticLaw.comment |
<annotations> | not used |
<listOfParameters> | biouml.model.dynamics.EModel.constants |
<parameter> | biouml.model.dynamics.Constant |
name | constant.name = reactionName_name |
value | constant.value |
units | constant.units |
<notes> | constant.comment |
<annotations> | not used |

Below we are describing differences between SBML model and BioUML model and how these differences are processed.
Compartment issues |
SBML model level 1 version 1 | model should have at least one compartment; any specie should belong to some compartment. |
BioUML model version 0.7.0 | diagram as compartment can contain species. |
Compatibility issues | SBML to BioUML: if compartment name equals to model/diagram name, then all species located in the compartment will be located in the diagram compartment. BioUML to SBML: if diagram has not internal compartments or contains species then we create special compartment for the diagram. The compartment name is diagram name. |

Component names |
SBML model level 1 version 1 | Global namespace, that is all model-level component names (compartments, species, reactions, parameters, parameter rules, and units) reside in the same global namespace. |
BioUML model version 0.7.0 | Local namespace, categories. Component (compartment, specie or reaction) name should be unique for the compartment. Parameters are uses other namespace that is global for the model. Units namespace is not supported yet. |
Compatibility issues | SBML to BioUML: we search the components in SBML global namespace. |
Pending | BioUML to SBML: semantic controller should provide that component, parameter name is unique for the model. |

Parameter names |
SBML model level 1 version 1 | Global namespace for the model, reactions introduce local namespaces for parameter names. |
BioUML model version 0.7.0 | Global namespace for the model. |
Compatibility issues | SBML to BioUML: we add prefix 'reactionName_' to local parameter name. BioUML to SBML: all parameters are global. |

Reaction components |
SBML model level 1 version 1 | Reaction should has at least one component and reactant. |
BioUML model version 0.7.0 | Reaction should has at least one component or reactant. Reaction can has modifiers (catalysts or inhibitors). |
Compatibility issues | SBML to BioUML: if reactant stoichiometry coefficient equals to zero it will be considered as modifier if reactant name equals to _in_empty_set it will be ignored;
_in_empty_set specie declared in <listOfSpecies> will be ignored too if reactant name equals to _out_empty_set it will be ignored;
_out_empty_set specie declared in <listOfSpecies> will be ignored too.
BioUML to SBML: if specieReference has type MODIFIER it will be saved as reactant with stoichiometry coefficient equals to zero; if reaction has not reactants special stub specie and specie reference will be generated. Stub specie will be added to <listOfSpecies> and stub specie reference will be added to <listOfReactants> specie.name = _in_empty_set specie.boundaryCondition = true specie.initialValue = 0.0 if reaction has not product special stub specie and specie reference will be generated. Stub specie will be added to <listOfSpecies> and stub specie reference will be added to <listOfProducts> specie.name = _out_empty_set specie.boundaryCondition = true specie.initialValue = 0.0
|
Pending | store modifier type using <biouml:> extension |

Formula issues |
SBML model level 1 version 1 | Function name - must be chosen from one of the functions available in SBML. Name tokens other than function names are names of parameters, parameter rules, compartments or species. |
BioUML model version 0.7.0 | Functions are not supported yet. All variables are starting with '$' sign. BioUML allows to use brief variable names, for example $specieName and qualified names, for example $compartmentName.specieName. During code generation BioUML uses EModel.getQualifiedName method to resolves brief variable name to fully qualified variable name. Constants that are starting from '$$' prefix are considered as internal and will not be shown to user in constants table. |
Compatibility issues | | SBML | BioUML | specie | name
| $name
| compartment | name
| $name
| global parameter | name
| name
| reaction parameter | name
| reactionName_name
|
|
Pending | functions support |
