Logo of bioinfoLink to Publisher's site
Bioinformatics. 2011 Aug 1; 27(15): 2167–2168.
Published online 2011 Jun 22. doi:  10.1093/bioinformatics/btr361
PMCID: PMC3137227

JSBML: a flexible Java library for working with SBML


Summary: The specifications of the Systems Biology Markup Language (SBML) define standards for storing and exchanging computer models of biological processes in text files. In order to perform model simulations, graphical visualizations and other software manipulations, an in-memory representation of SBML is required. We developed JSBML for this purpose. In contrast to prior implementations of SBML APIs, JSBML has been designed from the ground up for the Java™ programming language, and can therefore be used on all platforms supported by a Java Runtime Environment. This offers important benefits for Java users, including the ability to distribute software as Java Web Start applications. JSBML supports all SBML Levels and Versions through Level 3 Version 1, and we have strived to maintain the highest possible degree of compatibility with the popular library libSBML. JSBML also supports modules that can facilitate the development of plugins for end user applications, as well as ease migration from a libSBML-based backend.

Availability: Source code, binaries and documentation for JSBML can be freely obtained under the terms of the LGPL 2.1 from the website http://sbml.org/Software/JSBML.

Contact: gro.lmbs@maet-lmbsj

Supplementary information: Supplementary data are available at Bioinformatics online.


The XML-based Systems Biology Markup Language (SBML, (Hucka et al., 2003)) is the de facto standard file format for the storage and exchange of quantitative computational models in systems biology, supported by more than 210 software packages to date (March 2011). Much of this success is due to its clearly defined specifications and the availability of libSBML (Bornstein et al., 2008), a portable, robust, full-featured and easy-to-use library.

LibSBML provides many methods for the manipulation and validation of SBML files through its Application Programming Interface (API). Primarily written in C and C++, libSBML also provides automatically generated language bindings for Java™, among other programming languages. However, the full platform independence brought by the use of Java is limited in libSBML because the binding is only a wrapper around the C/C++ core, implemented using the Java Native Interface (JNI). As a consequence, some software developers experience difficulties deploying portable libSBML-based Java applications. Several groups in the SBML community thus began to develop their own Java libraries for SBML. To avoid needless duplication, some of these groups recently pooled their efforts and created JSBML, an open-source project to develop a pure Java library for SBML.

The primary aim of the project is to provide an API that maps all SBML elements to a flexible and extended Java type hierarchy. Where possible, JSBML strives for 100% compatibility with libSBML's Java API, to ease the transition from one library to the other. There are currently no plans to re-implement the more complex functionalities of libSBML, such as model consistency checking, SBML validation and conversion between different SBML Levels and Versions; separate community efforts are under way to provide such libSBML facilities via web services.

The software produced by the project is freely available from http://sbml.org/Software/JSBML.


A key achievement of the JSBML project is the development of an extended type hierarchy, designed from scratch based on the SBML specifications, but still following the naming conventions of methods and classes in libSBML. For each element defined in at least one SBML Level/Version combination, JSBML provides a corresponding class reflecting all its properties. SBML elements or attributes not part of higher SBML Levels (removed or made obsolete) are marked as deprecated. JSBML defines superclasses or interfaces for elements that share common properties. For instance, the interface NamedSBase does not directly correspond to a data type in one of the SBML specifications, but serves as the superclass of all SBase-derived classes that can be addressed by an identifier and a name. Similarly, all classes that may contain a mathematical expression implement the interface MathContainer. A full overview of this type hierarchy can be found in the Supplementary Material associated with this article. JSBML also supports SBML notes in XHTML format, as well as SBML annotations, including MIRIAM identifiers (Le Novère et al., 2005) and SBO terms (Le Novère et al., 2006). When building JSBML, the latest SBO OBO export can directly be downloaded and parsed (Holland et al., 2008). The Model class provides several methods, all beginning with the name find*, for querying SBML elements. Filters enable users to search lists for elements that possess specific properties. All ListOf* elements in JSBML implement Java's List interface, making iteration and the use of generic Java types possible. Figure 1 demonstrates how the hierarchically structured content of an SBML file can be easily visualized in the form of a tree.

Fig. 1.
(a) The SBML parser in JSBML understands the hierarchical data structure of SBML; (b) Example for SBML test case 26. Using JSBML for reading and visualizing an SBML file. The type SBase extends the Java interfaces Serializable for saving JSBML objects ...

JSBML includes parsers that read mathematical formulas in both MathML format and an infix formula syntax. Internally, it converts formulas into an abstract syntax tree representation; it can write out the trees in MathML, infix and An external file that holds a picture, illustration, etc.
Object name is btr361i1.jpg formula notations. In addition, although JSBML does not implement full-featured consistency checking of SBML models, it does throw Java exceptions in some situations to prevent users from creating invalid content. It implements a check for overdetermined models using the algorithm of (Hopcroft and Karp, 1973); this is also used to identify variables in algebraic rules. Further, JSBML can automatically derive the units of a mathematical expression. Whenever a property of some SBase is altered, an SBaseChangeEvent is fired that notifies dedicated listeners. As one possible application, graphical user interfaces could automatically react when the model is changed. Using modules, JSBML capabilities can be further extended; it can therefore be used as a communication layer between an application and libSBML or CellDesigner (Funahashi et al., 2003)—this also facilitates turning an existing application into a plugin for CellDesigner.


JSBML is an ongoing project that provides comprehensive and entirely Java-based data structures to read, write and manipulate SBML files. Its layered architecture allows for the creation of Java Web Start applications and CellDesigner plugins based on stand-alone programs with very little effort. New versions of SBMLsqueezer (Dräger et al., 2008) and Biomodels Database (Li et al., 2010) have already been released using JSBML. Many other projects are planned.

Funding: National Institute of General Medical Sciences (NIGMS, USA); funds from EMBL-EBI (Germany, UK); Federal Ministry of Education and Research (BMBF, Germany) in the projects Virtual Liver and Spher4Sys (grant numbers 0315756 and 0315384C). The grant number for the NIH grant that was, among others, used for the JSBML article reads 2R01GM070923.

Conflict of Interest: none declared.


  • Bornstein B.J., et al. LibSBML: an API Library for SBML. Bioinformatics. 2008;24:880–881. [PMC free article] [PubMed]
  • Dräger A., et al. SBMLsqueezer: a CellDesigner plug-in to generate kinetic rate equations for biochemical networks. BMC Syst. Biol. 2008;2:39. [PMC free article] [PubMed]
  • Funahashi A., et al. CellDesigner: a process diagram editor for gene-regulatory and biochemical networks. BioSilico. 2003;1:159–162.
  • Holland R.C.G., et al. BioJava: an open-source framework for bioinformatics. Bioinformatics. 2008;24:2096–2097. [PMC free article] [PubMed]
  • Hopcroft J.E., Karp R.M. An n5/2 algorithm for maximum matchings in bipartite graphs. SIAM J. Comput. 1973;2:225.
  • Hucka M., et al. The systems biology markup language (SBML): a medium for representation and exchange of biochemical network models. Bioinformatics. 2003;19:524–531. [PubMed]
  • Le Novère N., et al. Minimum information requested in the annotation of biochemical models (MIRIAM) Nat. Biotechnol. 2005;23:1509–1515. [PubMed]
  • Le Novère N., et al. Adding semantics in kinetics models of biochemical pathways. In: Kettner Hicks., editor. 2nd International ESCEC Workshop. ESEC, Rüdessheim/Rhein, Germany: Beilstein Institut, Rüdesheim, Germany; 2006. pp. 137–153.
  • Li C., et al. BioModels database: an enhanced, curated and annotated resource for published quantitative kinetic models. BMC Syst. Biol. 2010;4:92. [PMC free article] [PubMed]

Articles from Bioinformatics are provided here courtesy of Oxford University Press
PubReader format: click here to try


Save items

Related citations in PubMed

See reviews...See all...

Cited by other articles in PMC

See all...


  • PubMed
    PubMed citations for these articles

Recent Activity

Your browsing activity is empty.

Activity recording is turned off.

Turn recording back on

See more...