libSBML Python API
5.8.0
|
libSBML NEWS -- History of user-visible changes ==================================================================== Version 5.8.0 (2013-02-28) ==================================================================== STABLE RELEASE * Flux Balance Constraints - The first official version of the specification of Flux Balance Constraints is now available and thus the libSBML code for 'fbc' is now included in the stable release of libSBML. This means that all prebuilt binaries for the stable release will include the 'fbc' package code. The src archive containing libSBML core code will continue to be available but there will be additional src archives available in the stable branch: one containing libSBML core plus all stable packages and additional archives of the individual package code. NOTE: The libSBML GNU make-based build system has not been updated for packages. Thus, to build from src, it is necessary to use the CMake build system. * New features - The converter that expands SBML FunctionDefinition constructs has been extended with an additional option that allows the user to specify particular <functionDefinition> objects that should not be expanded. - We have changed the behavior of the converter that converts between core Levels and Versions of SBML. This converter has a boolean option, 'strict', that determines whether an invalid model can be converted or produced. The code originally assumed that 'strict = false' refers to syntactic validity only, and so even when the flag was set to false, the converter could fail to convert a model if semantic validity was not preserved. This interpretation has been changed because people felt it was not useful; now, setting 'strict' to 'false' will always convert a model, and if there are errors related to altered semantics, the errors will be logged in the usual error log. - Documentation for the 'comp' and 'fbc' C++ API is now available. - 'comp' package updates: - The C API for comp is now available with an example of creating a model using this API. - The majority of 'comp' package validation rules have now been implemented and will be reported. Validation has also been expanded to apply validation from core and other packages (where appropriate) to any ModelDefinitions contained within a comp model. * Bug fixes - LibSBML was still writing out the deprecated, and in some cases removed, attribute 'charge' on a <species>. This is no longer the case. - Some files caused the SBML Level and Version converter to enter an endless loop. This has been fixed. Thanks to the good folks at Persistent Systems Ltd. for reporting this. - Reading an attribute with a value of type 'double' was failing to report when a different type was encountered for the value. This has now been sorted and will be correctly logged as an error by the readSBML functions. - The Level and Version converter was in some cases running unit validation even if the user had specified that they did not require strict unit validation. This was in fact done by libSBML to allow an error to be logged; however, it has become clear that the large computational overhead of running unit validation is unecessary to merely log an error. Thus, if the user has declared that they do not require unit validity, the checks will no longer be applied. - 'layout' package-specific bug fixes: - The extension namespaces were not being correctly set. This has been fixed. - 'comp' package-specific bug fixes: - The function 'renameSIdRefs' now functions properly for SBaseRef-derived classes. * Configuration/build system changes - 'fbc' package-specific build system changes: + The GNUMake build system has not been implemented for packages. Thus, to build from src, it is necessary to use CMake. * Miscellaneous - The structure of the API documentation has been slightly overhauled to provide clearer access to relevant information. EXPERIMENTAL RELEASE * New features - 'qual' package-specific new features: - New functions getInputBySpecies(std::string) and getOutputBySpecies(std::string) have been added to the Tranisition class. These will return the first Input/Output in the relevant list that matches the qualitativeSpecies attribute value supplied as argument. * Bug fixes - 'qual' package-specific bug fixes: - As validation of packages is starting to be introduced the situation whereby a ListOfFunctionTerms can contain no FunctionTerm elements but only a DefaultTerm caused issue with the code that reports an empty ListOf object. This has been fixed. - 'render' package-specific bug fixes: - Conversion between L3 and L2 annotation was not working as expected. This has been fixed. - The interaction between layout GraphicalObjects and the render 'objectRole' attribute was removing the attribute on occasion. This has been fixed and more fully tested. ==================================================================== Version 5.7.0 (2013-01-14) ==================================================================== STABLE RELEASE * Hierarchical Model Composition - The first official version of the specification of Hierarchical Model Composition is now available and thus the libSBML code for 'comp' is now included in the stable release of libSBML. This means that all prebuilt binaries for the stable release will include the 'comp' package code. The src archive containing libSBML core code will continue to be available but there will be additional src archives available in the stable branch: one containing libSBML core plus all stable packages and additional archives of the individual package code. NOTE: The libSBML GNU make-based build system has not been updated for packages. Thus, to build from src, it is necessary to use the CMake build system. Known limitations of the 'comp' code: + Documentation has not yet been integrated into the libsbml documentation. + Whilst the majority of validation rules have been implemented, some will report the schema error id rather than the specific comp validation rule id. The more involved rules involving circular dependencies and in-depth referencing have not been implemented. Validation of ModelDefinitions is implemented with respect to comp validation, but not with respect to core validation. + There is no C API for interacting directly with comp objects. However the C API for reading and validation will apply to the 'comp' package and flattening can be accessed via the converter C API to call the CompFlatteningConverter. * New features - Convenience functions have been added to the SBMLExtensionRegistry class to facilitate enabling/disabling packages using just the package name. For example: disablePackage(const std::string& package); enablePackage(const std::string& package); - Previously the setNotes function accepting a string as argument expected the string to contain the appropriate XHTML tags and would not set the value of the <notes> element to a string that did not meet this requirement. The functionality of the setNotes(const std::string&) function has been extended to allow a user to add an optional boolean argument addXHTMLMarkup. When the value of this argument is 'true' the function will accept a string; wrap it with the XHTML <p> tag and set the <notes> element to this. - A C API for use with the converters has been added. Examples of using the converter API are available in all supported languages. - 'comp' package - Access to the flattening routines has been restricted to the CompFlatteningConverter. This allows options to be specified by the user regarding ignoring other packages and whether to produce a document with no comp namespace or a document with the comp namespace but the required attribute set to 'false'. - Validation has been implemented (see note above). This is called via the checkConsistency function within core libSBML; which now accesses a checkConsistency function in the comp plugin. There are two categories of validation: LIBSBML_CAT_GENERAL_CONSISTENCY and LIBSBML_CAT_IDENTIFIER_CONSISTENCY which are enables or disable via the setConsistencyChecks() function on the SBMLDocument (in libSBML core). - The API for resolving external models has been updated to use a registry of resolvers. This facilitates the addition of user specific resolvers. * Bug fixes - The number of arguments expected by a piecewise function was incorrectly assumed to be two. However, a piecewise function can have a single argument. This has been corrected. - Validation of SBML Level 3 was issuing a general warning about missing required attributes but failing to identify which attribute had caused the error to be reported. This has been corrected. Thanks to Nicolas Rodriguez for pointing this out. - Validation was failing to report the incorrect use of a function call if the lambda function usesd expected no arguments. This has been fixed. - The L3Parser was not dealing with the sqrt function correctly. This has been sorted. - 'comp' package-specific bug fixes: + SBOTerms were not being correctly dealt with when they occured on a Port element. This has been corrected. Thanks to Chris Myers for reporting this. * Configuration/build system changes - Building the MATLAB binding for libSBML can be problematic due to the need to identify and use the MATLAB mex compiler. When MATLAB is being accessed over a network this can result in misleading error messages. The build system has been improved to halt compilation if the mex compiler is not available and to give a clearer error message as to how to proceed. - The build system has been updated to facilitate use with the Mac OS X 10.8 operating system (Mountain Lion). - 'comp' package-specific build system changes: + The GNUMake build system has not been implemented for packages. Thus, to build from src, it is necessary to use CMake. * Miscellaneous - It was reported that gcc 4.7 found the various definitions of isnan used within some parts of libSBML to be problematic. This problem has been addressed and there are now functions util_isNaN and util_isFinite in the util file that are used throughout libsbml. Thanks to Totte Karlsson for reporting this. - Where test files compare double values the comparisons have been unified to use the util_isEqual(double, double) function and thus avoid inaccurate results that can be machine dependent. - This NEWS.txt file has reduced in size with NEWS dating from prior to libSBML-5 now saved as an OLD_NEWS.txt file. EXPERIMENTAL RELEASE * New features - 'Qual' package: - The package specification redefined whether some attributes or elements were required; the code has been updated appropriately. - 'Fbc' package: - The package specification added some optional attributes and deprecated the use of strict less than or greater than; the code has been updated appropriately. * Bug fixes - 'Render' package: - In some cases the code was failing to add expected attributes to particular elements. This has been corrected. ==================================================================== Version 5.6.0 (2012-08-03) ==================================================================== A note on the use of SWIG: All aspects of libSBML-5.6.0 requiring SWIG are known to work with SWIG version 2.0.4. Issues with later versions have been found with respect to some areas of a libSBML build. These will be addressed in future releases but for libSBML-5.6.0 we recommend the use of SWIG 2.0.4. STABLE RELEASE * New features - LibSBML now includes a binding to R (The R Project for Statistical Computing). The binding is generated using SWIG and thus can be built by users. Alternatively, the libSBML-5.6.0 release provides R packages that can be installed directly into R. - During HARMONY 2012, people discussed the issue of providing support for Level 3 Layout in other SBML Level 3 packages. The conclusion was that additional GeneralGlyph elements should be added in order to support references to as-yet unknown types of objects to be defined in Level 3 packages. These additional elements have been included in the libSBML layout code. - Although libSBML GNU makefiles have technically supported Python 3 for some time, there had been no feedback regarding the use of Python 3 until recently. In response to the feedback, we have the updated the build system to facilitate the use of different versions of Python 3. On Windows, the libSBML release also includes prebuilt installers for Python 3.2. - The libSBML 'configure' command now accepts the additional option --with-python-interpreter, which allows you to specify the Python interpreter that should be used. This is useful when a system has multiple versions of Python installed in the same directories, and the version that should be used can be selected by explicitly invoking the desired version. The option takes a full path, as in "--with-python-interpreter=/usr/bin/python2.7". - In order to facilitate the use of identifiers.org URLs, we added an additional function, getSBOTermAsURL, to the SBase class. This function returns a string representation of the SBOTerm in its resolvable identifiers.org URL format; e.g., "http://identifiers.org/biomodels.sbo/SBO:NNNNNNN" - The use of libSBML get and set functions in Python; a by-product of the use of SWIG; is not particularly intuitive. LibSBML-5.6.0 applies a patch that allows the use of indexing in the python environment i.e. model->getSpecies(0)->getId() can be replaced with model.species[0].id. This patch is limited to Python 2 versions at present. It does not adversely effact existing functions for either Python 2 or Python 3. Many thanks to Gordon Ball (Computational Medicine, Karolinska Institute) for creating and sharing this patch. * Bug fixes - When using a copy of libSBML compiled with Level 3 package support, attributes from the "sbml" namespace were not given a namespace prefix when they should have been. This has been fixed. - The L3Parser had some subtle bugs on some operating systems when dealing with very long numbers or exponentials. These have been tracked down and fixed. - Although libSBML explicitly prevented History or CVTerm objects from being added to the annotation of an object when that object had no metaid attribute value, it was still possible to add History and CVTerm directly to the annotation. This could lead to invalid MIRIAM annotations because they lacked a metaid attribute value. LibSBML now checks that an object to which any MIRIAM compliant annotation is being added has a metaid. - When returning a MIRIAM-compliant annotation, all CVTerms were lost if just one had an invalid qualifier. This has been fixed. - The decompression code uses a macro OF that is not defined for all versions of linux. A definition has been added to avoid problems. Thanks to Kai Wohlfahrt for reporting this. - There was a potential memory leak issue while registering SBMLConverters. Thanks to Akira Funahashi and his team for spotting the problem and supplying a fix. * Configuration/build system changes - As SBML Level 3 packages and their code become available, there is a increasing number of possibilities in the matrix of what a particular instance of libSBML has included. In order to facilitate code that may rely on the presence of one or more packages, the CMake configuration process has been improved to include a set of flags that identify the packages included in a particular build. The file convertLayout.cpp in the examples/c++ directory illustrates the use of these #define's. - The MATLAB bindings failed to build on Mac OS X whenever an Xcode version was used that did not include the Mac OS 10.6 SDK. This has been fixed. - The CMake build system has been made more resilient to finding include files from previous libSBML installations. EXPERIMENTAL RELEASE * New features - The Qualitative Modeling package "qual" is now supported. - The R binding is available for all packages. - 'Groups' package: - At HARMONY it was agreed that the 'group' element needed an additional attribute 'kind'. This has been added. - 'Spatial' package: - There was an issue with the encoding of image data for the spatial package. This has been solved by providing a function that will uncompress the data and return it to the user in a usable form. - 'Comp' package: - Instantiated Model objects in Submodels now are set to have that Submodel as their parent. The SBMLDocument is still set to the document of the original Model, so that its own Submodel references can be properly tracked down. ==================================================================== Version 5.5.0 (2012-05-11) ==================================================================== STABLE RELEASE * Revision of annotation and SBML MIRIAM RDF Following discussions on the libsbml-development mailing list we have adjusted the way functions affecting annotations interact with the SBML MIRIAM RDF classes for History and CVTerms. - Previously any annotation was assessed and if it contained MIRIAM RDF the corresponding classes were created and the original annotation XMLNodes relating to these objects was removed from the annotation. When the annotation was retrieved the xml was reconstructed from the History and CVTerm classes. This is no longer the case. In 5.5 we have changed the code so that the MIRIAM objects are created BUT the original annotation remains intact. It is only reconstructed if the code has directly altered the History or CVTerm classes via the class API, otherwise the original annotation is returned. - We reassessed the use of the appendAnnotation function. Previously any annotation was appended regardless of whether the existing annotation already contained a top level element with the same namespace. We considered this to be a bug, since it would result in invalid SBML. Thus, the appendAnnotation function now checks whether there is an existing top-level element with the same namespace of any it is to append and does not append if it encounters a duplicate. It returns an OperationReturnValue of LIBSBML_DUPLICATE_ANNOTATION_NS to indicate this to the user. - In our reassessment of appendAnnotation we came to the conclusion that it was virtually impossible to correctly determine the intent of the user in cases where both the existing and appending annotation contained RDF that complied with the SBML MIRIAM RDF History or CVTerms. Thus the appendAnnotation function no longer treats RDF as a "special" case. If there is existing RDF, no further RDF will be appended. Users wishing to alter existing History or CVTerms should use the API provided or construct their own annotation and use the setAnnotation function. - New functions removeTopLevelAnnotationElement(std::string name) and replaceTopLevelAnnotationElement(XMLNode* annotation) have been introduced to allow users to remove or replace a single top level annotation element whilst conserving any other annotation that may be present. * New features - There is now a version of the infix to MathML parser that is independent of L1 constructs. This parser is available as three functions: SBML_parseL3Formula(""), SBML_parseL3FormulaWithModel("", Model*) and SBML_parseL3FormulaWithSettings("", L3ParserSettings *). There is a new object L3ParserSettings that allows the user to tailor the results of the function, for example to parse "log" as natural log or log base 10; to allow users to enter units on numbers as "10m" or to disable this feature along with some other options. - The getLine() and getColumn() functions did on some occasions return a maximum int value when the correct lines and columns could not be determined. This produced inconsistent behaviour as some XML parsers return '0' as if they cannot determine location. This has been unified and libSBML's getLine()/getColumn() will now return '0' if the location is unknown. - There is a new class SBMLDocumentPluginNotRequired which allows a package code to derive from an object where the required attribute is considered 'false' until it has been set. Note this is not a "default" value it is just the value with which the boolean attribute is initialised. The existing SBMLDocumentPlugin class assumes a value of 'true'. This is in fact a change in behaviour but since users should set this value it should not cause a problem. * Bug fixes - Tracker issue#3509843 The annotation element in SBML should contain only elements. Schema validation reports this but libSBML was not. This has been corrected. Thanks to Camille Laibe for still running schema validation and reporting the issue. - There was a subtle bug involving accessing a NULL ModelHistory object. This has been fixed. - Area units were not being properly converted between SBML Levels. They are now. - An AST plus or times node that was created with more than two children was written out as only having two children; thus losing information. This behaviour has been corrected. - Functions used to add objects to other objects in libSBML check that the SBML Level/Version/Namespaces of the objects correspond. However these checks were imposing the condition that the number of namespaces on both objects be the same. This is not a necessary condition and the code has been relaxed. Thanks to Chris Myers for pointing it out. - In XML if the sbml element is not prefixed but the only declaration of the sbml namespace is, then technically the sbml element has not been placed into the sbml namespace. LibSBML was failing to report this. This has now been fixed. - There was a curious indentation issue that arose if notes used text as child elements of an element that also had another non-text child element. This could proliferate and cause models where the indentation ran into the thousands of spaces. This has been sorted out and no longer happens. * Miscellaneous - The uninstallation instructions were out of date. This is now updated, for example to mention that the Mac OS X installer does in fact provide an uninstall script. * Configuration/build system changes - Doxygen versions 1.7 and 1.8 are now supported, but due to differences in the new version, older versions of Doxygen are no longer supported. The 'configure' script will now only accept version 1.7 at minimum. - Some changes have been made to facilitate building libSBML with the Borland compiler. This included standardising the use of #ifdefined rather than using #if. Thanks to Totte Karlsson for the effort of getting this to work. - The CMake build has been updated to facilitate the use of the Intel compiler. EXPERIMENTAL RELEASE * New features - New macros provided so that SBMLNamespaces objects may easily be created to allow package elements to be extended by other packages (for example: a comp:modelDefinition to have a layout:listOfLayouts). These macros now used throughout package system when creating new package elements. - In 'comp': - ExternalModelDefinitions have a new function, 'getReferencedModel' that tries to find the referenced document and model, if the reference URI is a 'file' type. If the SBMLDocument has its fileURI set, this will use that to search for relative filenames. - With the above in place, automated flattening now works with ExternalModelDefinitions that point to local files. - May now use ModelDefinitions to create the main Model of an SBMLDocument. ====================================================================== Version 5.4.1 (2012-02-24) ====================================================================== STABLE RELEASE * Bug fixes - The MATLAB binding function isSBML_Model had a subtle bug that meant it could crash in certain circumstances. This has been addressed. Thanks to Ying Zhang for the report. - When determining units from rate rules unit checking failed to catch the case where time had been redefined as dimensionless. This is now fixed. Thanks to Kieran Smallbone for reporting it. - Documentation files for MATLAB were missing from the dmg installers for MacOS. This has been fixed. - 'getElementBySId' could potentially return initial assignments, event assignments, assignment rules, and rate rules that assigned *to* the SId in question, instead of returning the actual element with the SId. This has been fixed. EXPERIMENTAL RELEASE * Bug fixes - LibSBML will now automatically register any packages that are enabled in code. Previously libSBML could be built including package code but users needed to perform an additional step to actually use it. This was causing some confusion. ====================================================================== Version 5.4.0 (2012-02-16) ====================================================================== STABLE RELEASE * New features - Basic validation of MIRIAM compliant RDF annotations that are parsed into ModelHistory or CVTerm objects has been added to facilitate the use of annotations that are not yet quite complete. Warnings are now issued relating to whether or not the rdf:about attribute accurately points to the metaid of the containing object and whether the object that was created was consisdered a valid object in the attributes and subelements that are required. - It has been noted that unless the checkConsistency function is called immediately after reading an SBML document, it does not report all potential errors. Since users may wish to apply the function to a model being constructed this seems to be a disadvantage of the function. However, as this function has been in libSBML for many years it was decided not to alter the functionality but to add a new function 'validateSBML' which, when called from a document object, will force a write and read of the in memory object and report validation errors for the object as written. Thus, all errors will be reported with line numbers that would correspond to the document if written out. - Conversion of a model containing FunctionDefinitions to L1 is now supported. - Conversion of a model containing InitialAssignments to L2V1 and L1 is now supported. - There is a new isSetBody() function for the FunctionDefinition class that returns true if the body of the lambda function has been set. - The MATLAB/Octave binding function OutputSBML now takes an additional optional flag (extensions_allowed defaulting to true) that allows a user to specify whether the MATLAB_SBML structure should be considered valid if it contains any additional fields. - Multiple namespaces using the same prefix are not allowed in XML. The function that added XMLNamespaces in libSBML checks for an existing namespace with the prefix of the namespace being added and overwrites the original if a duplicate is found. This behaviour meant that it was possible to unintentionally remove the sbml namespace. The behaviour of the function has been altered such that if the namespace being added has a prefix that duplicates that of the existing sbml namepace then the function returns failure and the new namespace is not added. Should the sbml namespace need to be replaced it can be done by using the remove function before adding the new namespace. - SBase objects that occur in Level 3 package code need to keep track of the namespace of the package to which they belong. However, a conversion might alter the namespace; for example with layout where the level 2 layout annotation has its own namespace. The getURI function has been altered to adopt the approach used for tracking the core sbml namespace of any object i.e. the namespaces of the containing document take precedence and the namespace stored on an actual object is only considered if it does not belong to a document. An additional function getElementNamespace() can be used to obtain the namespace stored on the actual object. * Bug fixes - Tracker issue #3472034 Line numbers were not being reported as accurately for L2 models as for L3 models. We have overviewed all the code relating to line numbers and improved the accuracy and consistency of line numbers reported. Thanks to Raimund Rönn for the report. - Tracker issue #3471902 The documentation for the readSBMLFromString function claimed it prepend the xml encoding if it was not present. In fact, the function did not do this. This has been corrected. Thanks to Raimund Rönn for reporting it. - Tracker issue #3466104 Fixed inaccuracies in the documentation. Thanks to Raimund Rönn for his careful reading and taking the time to report the errors. - Validation failed to notice that csymbol avogadro was not valid in Level 2. This is fixed. - Exceptions were not being correctly wrapped for language bindings causing potential code crashes. This has been corrected. - A number of minor issues with regard to conversion between levels and versions have been fixed. These include conversion from L3 to L1 failing to include a compartment; stopping conversion of models with hasOnlySubstanceUnits = true to L1; correcting conversion of L3 models with localParameters and preventing conversion of L3 models where Events had Priorities or where the csymbol avogadro had been used. - The internalConsistency validator was incorrectly reporting that the an Event must have a listOfEventAssignments in a level 3 model. This restriction was actually removed in SBML Level 3. - The MathML subset used by SBML has plus/times/and/or/xor. In the MathML specification all these functions are nary functions i.e. they are permitted to have any number of arguments including zero. LibSBML had in fact restricted these functions to two or more arguments. This inconsistency has been corrected. - Validation was failing to apply constraints to L3 LocalParameters. This has been corrected. - Using a value for a units attribute that was not a builtin unit or the identifier of a UnitDefinition is invalid. However, the way in which this was reported varied according to which unit attribute caused the issue. This has been standardized to produce an id warning about a dangling UnitSIdRef and (if selected) unit warnings relating to the impact of the actual attribute. - In certain situations libSBML would write out both the stoichiometry attribute and a stoichiometryMath element. Since these are mutually exclusive this should not happen. It has been fixed. - The code that checked for consistent namespaces when adding one object to another was too restrictive. This has been sorted. Thanks to Chris Myers for reporting it. - Conversion between levels was inconsistent when it came to dealing with rational stoichiometry. This has been fixed. - The tests for the Perl bindings use of BigInt caused ActivePerl to crash on a Windows system. A workaround to prevent this has been put in place. - LibSBML class constructors currently throw exceptions rather than create objects with invalid SBML namespace/level/version information. This could potential result in code crashing when using one of the language bindings. These have now been rigorously tested and measures put in place to prevent such crashes from happening. - The SBMLTransforms class now correctly evaluates piecewise expressions. - The MathML infix converter now deals correctly with unary plus and times. - The help text for classes and methods in the Python library were previously unformatted, marked-up Doxygen input text, making the help text unhelpful. We wrote a new conversion program to process the marked-up text and produce plain-text documentation strings in the Python library. Users can now use the standard Python 'help' function to obtain help as expected. - The StripPackageConverter was not working as expected. This has been fixed. * Miscellaneous * Configuration/build system changes - As libSBML has evolved over the years the header files included by a given code file have expanded. This makes it necessary to recompile many files when only a single header file has been altered. In an attempt to eliminate unnecessary dependencies we have done an overview of the code. However, merely replacing existing include files with those that are actually required may cause build issues for other users. Thus we have introduced a LIBSBML_USE_STRICT_INCLUDES flag. This flag is not defined by default and thus no includes will change. Defining the flag means that code will only include the minimum number of necessary header files. We encourage people to consider using this flag as it may become the default behaviour in later versions of libSBML. The flag is available via the CMake build interface. EXPERIMENTAL RELEASE * New features - Code for the 'render' extension is now available. - All package code has been updated to use the new line/column number reporting mechanism. - Package language bindings have been updated to properly wrap exceptions and use covariant return types. - There is a new example with the 'layout' package that demonstrates conversion between the layout and render L3 package representation and the L2 annotation representation. ====================================================================== Version 5.3.0 (2011-12-23) ====================================================================== STABLE RELEASE * New features - Errors reported by the matlab binding function 'OutputSBML' have been improved to provide information about why the structure is invalid. - There is a new virtual function on an SBase object 'setElementText'. This enables a user to store text that the read functions encounter within an XML element. Previously such text was ignored as no such text existed as a part of an SBML Core element. Some L3 packages may use this XML feature and can thus utilize this function. - There is a new function on an ASTNode 'returnsBoolean' that returns a predicate indicating that the math of the ASTNode will return a boolean result or not. The function has an argument of type Model with a default value of NULL. Where necessary, that is, when the ASTNode involves a call to a user defined function, the check is done in the context of the supplied argument Model or the parent Model of the particular ASTNode if no argument is supplied. - There are new functions to facilitate the use of packages. The SBMLExtensionRegistry has a 'disableUnusedPackages' function which disables registered packages that are not being used by the target SBMLDocument. The base SBMLExtension class has a function 'isInUse' that will establish whether a package is being used by the target document. * Bug fixes - The conversion code incorrectly converted an L3 model where the stoichiometry was changed by a RateRule. This has been fixed. - Conversion from L3 to L2 was failing to write out the spatialDimensions attribute of a Compartment regardless of the value. It now correctly writes out a non default value. - The RegisterConverters class was not included in the LIBSBML_CPP_NAMESPACE. This has been corrected. Thanks to Christoph Flamm for letting us know. - There was a slight discrepancy in how the assignment operator for the SBMLExtensionNamespaces was behaving depending on OS. This has been sorted so that behaviour is the same for all. - Tracker issue #3438777 The XercesParser was failing to find the line and column number definitions with some compilers. This is now fixed. Thanks to David Fange for reporting it. - Tracker issue #3441615 There was an issue with SWIG, C# and MSVC compilers caused by conflict with MS MFC and GDI classes. This has been fixed by explicilty excluding these classes. Thanks to Totte Karlsson for reporting this. - Tracker issue #3461400 Writing out an L2 model with Layout annotation caused duplicate annotations to be written out. This has been fixed. Thanks to Raimund Rönn for reporting the problem. - Tracker issue #3462055 A couple of typos have been corrected. Thanks to Raimund Rönn for taking the time to report these. - The documentation for Python did not omit internal libSBML methods. This is now fixed, and the docs more properly reflect the public libSBML API. - We have fixed a number of errors in the Python API documentation, such as return values being reported as "char" when in fact they were strings, and have filled out more of the missing documentation. - We have fixed many other small documentation bugs and filled out more of the missing documentation. * Miscellaneous - The matlab binding contains a function 'isSBML_Model' that checks that the structure contains all the fields that are expected in an SBML model. This function is used by OutputSBML to determine if the model can be written out. Previously this function would only report that a model was valid if each of the substructures had the expected fields and no additional fields. This behaviour has changed to allow users to include extra information within the structure. Thus a model is considered invalid if it does not have all the expected fields; additional fields are ignored. - The libSBML examples code has been ported to all language bindings; so all examples exist in each language. - The API manuals for languages besides Java now feature a more modern and attractive appearance. * Configuration/build system changes - Using CMake to link against the static runtime libraries on windows when using libxml2 it was necessary to manually add links to other libraries. The build system now takes care of these. EXPERIMENTAL RELEASE * New features - There is now code to support the L3 render package. ====================================================================== Version 5.2.0 (2011-11-11) ====================================================================== * Download directory structure - Prior to this release we have provided stable libSBML source code and associated binary installers, but only provided the source code of the L3 packages that are in beta development. In response to requests to provide binaries including the package code, we have slightly reorganised the directory structure of the 5.2.0 release. The top level directory remains as expected https://sourceforge.net/projects/sbml/files/libsbml/5.2.0 This directory contains two sub-directories 'stable' and 'experimental'. 1) files/libsbml/5.2.0/stable This directory contains the source code and various binary installers arranged in a structure identical to that used in the 5.1.0-b0 and 5.0.0 releases. 2) files/libsbml/5.2.0/experimental This directory also contains two subdirectories. a) files/libsbml/5.2.0/experimental/src This directory contains the archives of the beta source code for the L3 packages; similar to those previously contained in the separate top level directory /5.1-packages-beta/. b) files/libsbml/5.2.0/experimental/binaries This directory contains binaries that include the stable source code plus the beta code for ALL of the packages. It should be noted that these binaries may be untested and are provided 'as-is' to facilitate experimentation with L3 packages. * New features - There is a new method 'removeFromParentAndDelete()' that enables the complete removal of child objects from any SBase object. - There is a new method 'getAllElements()' that returns a List containing all the children, both direct and indirect, of the object on which it is invoked. - There are new methods that will rename any references to SId and UnitSId throughout the model. - A new converter has been added that will convert the units of a model to base SI units. - A new converter has been added that will order AssignmentRules and InitialAssignments in such a way that forward references are avoided. - The validation API has been refactored to facilitate the use of third-party validators. The existing API has been maintained; in addition, it is now possible to call any external validator, regardless of programming language, using the new validator API. - There is a new UserData object on the SBase class. This facilitates storing additional application-specific information that may be useful to particular software. - A new function, appendFrom(ListOf *), on the ListOf class allows the contents of one ListOf object to be appended to another. - There are new functions getNumRegisteredPackages() and getRegisteredPackageName(index) that allow the user to establish which Level 3 packages have been enabled in the instance of the libSBML library being used. - The C API for interacting with the package plugin mechanism has been expanded. * Bug fixes - The functions that add SBase objects were only checking that the object being added had the correct Level and Version of SBML. It failed to check that any SBML namespaces used also matched. This has been corrected. - Error checking failed to catch SBML L3 models with an empty <listOfEventAssignments>. Fixed. - If the units of an object referred to a UnitDefinition that had no <lisOfUnits>, the warnings generated by the unit checking code were inconsistent. These have now been standardized. - The UnitDefinition::isVariantOfMass() function did not check that the exponent of any unit was '1'. This has been fixed. - The postal address for the Free Software Foundation was out of date in all files where it was mentioned. Fixed. - It was (erroneously) possible to allow the SBML namespace to be replaced and lead to the production of a document with no SBML namespace. Fixed. - Some of the older libSBML C code called the exit() function when a memory allocation error occurred. This is not an ideal way to handle a problem. Since the functionality has existed in libSBML for many years it has been removed from a standard build but can be reenabled using a configuration flag should any users wish to do so. - The point at which an MSVC call to the c_str() function tidies up its memory usage when running in debug mode is different to the point at which the memory is tidied up when running in release mode or with other C compilers. This means that a C function that returns a char * which is created using c_str() will return an invalid pointer. Unit testing does not highlight this issue as it only occurs in an MSVC Debug build. Duplicating the string before returning it solves the problem. LibSBML-5.1.0-b0 had three new functions where the string duplication was missing. This has now been fixed. - In the layout code, adding a <Point> to a <BoundingBox> produced an element with the wrong name. This has been fixed; a fix that revealed further issues with the constructors for packageNamespaces. This issue has also been fixed. Thanks to Chris Myers for reporting the original problem. * Miscellaneous - There were inconsistencies arising from the naming of functions related to packages; some being named doPkgFoobar and others doPackageFoobar. All of these functions now use the doPackageFoobar naming format. Existing functions using the Pkg format will still work but should be considered deprecated. - The text of many SBML validation and consistency-checking error messages have been edited to hopefully improve readability, clarity and consistency. - All example files have been overhauled and new ones added. - Users reported that some of the SBML files in the "test-data" directories were invalid, not realizing that this was actually intentional because the files are used for testing libSBML. In order to avoid confusion, the files containing invalid SBML have been renamed to append '-invalid' to their file names. - The files located in the validator/test-data directory, used for testing the SBML validation code, have been reorganised into smaller subdirectories. The new subdirectories group the files according to the type of validation being tested. * Configuration/build system changes ====================================================================== Version 5.1.0-b0 (2011-08-25) ====================================================================== This release includes a provisional implementation of support for an SBML Level 3 package for "layout" based on code from Ralph Gauges of the COPASI group. No other packages are included with this release; this applies to the "groups" package as well, which was in the beta release but is not in this release. However, the SVN repository on SourceForge has a branch for packages where ongoing development is proceeding, and as specifications and code for SBML Level 3 packages are settled, future libSBML releases will include stable versions of packages as they become available. Source code for beta versions of packages will also be made available from a separate download area, http://sf.net/projects/sbml/files/libsbml/5.1-packages-beta * New features - The inline formula code will now deal with a unary plus. - There is a new API for performing conversions between SBML Levels, Versions, and SBML Level 3 packages on an SBML Document. Existing functions such as setLevelAndVersion() have been reimplemented using the new API and so will continue to work as expected. The new API will facilitate the introduction of conversion routines that deal with Level 3 packages. - The MATLAB_SBML Structure produced using the MATLAB/Octave bindings now includes fields for the SBML Level and Version on all sub-structures. - There are new functions getElementBySId() and getElementByMetaId() that will traverse the entire document and return a pointer to an SBase object with the SId or MetaId supplied. - There are new functions on the SBO class to reflect the new top-level names introduced in the SBO ontology. * Bug fixes - There were a couple of places where the clone methods failed to create a proper copy. These have been fixed. Thanks to Nicolas Rodriguez for reporting this. - The introduction of the ability to place a units attribute from the SBML L3V1 core namespace into a <cn> MathML element meant that the code for reading and writing MathML needed to be fully aware of which SBML namespaces it was working with. This has been done. - Tracker issue #3296228 Importing a file with a large number of validation errors into MATLAB was causing memory issues within MATLAB. The handling of errors has been improved to avoid this situation. * Miscellaneous - Necessary updates to support the latest version of swig. * Configuration/build system changes - The introduction of Mac OS X 10.7 Lion produced issues with both XCode 4.0 and MATLAB. These have been addressed. ====================================================================== Version 5.0.0 (2011-04-14) ====================================================================== This is the first release of libSBML-5.0.0. There are three types of potential changes in this release compared to the beta 5.0.0 release: changes that relate to support for SBML Levels 1, 2 and Level 3 Core; changes that relate to support for L3 packages, and changes that were introduced in libSBML-4.3.1. These are listed separately below for convenience. This release includes a provisional implementation of support for an SBML Level 3 package for "layout" based on code from Ralph Gauges of the COPASI group. No other packages are included with this release; this applies to the "groups" package as well, which was in the beta release but is not in this release. However, the SVN repository on SourceForge has a branch for packages where ongoing development is proceeding, and as specifications and code for SBML Level 3 packages are settled, future libSBML releases will include stable versions of packages as they become available. Source code for beta versions of packages will also be made available from a separate download area, http://sf.net/projects/sbml/files/libsbml/5.0-packages-beta ------------------------- Known limitations ------------------------- At present, libSBML 5 will not attempt to convert a model between SBML Levels (e.g., from Level 3 to Level 2) if the model uses SBML Level 3 packages. This applies to SBML layout elements and annotations too. Our aim is to support conversion between L2 layout annotations and the L3 layout package, but this functionality will be introduced in a future release of libSBML. -------------------------------------- SBML Level 3 Package extension changes -------------------------------------- * New features - The extension mechanism for supporting SBML Level 3 packages now includes a full C API. - LibSBML now has greatly improved detection and error reporting of unimplemented/unknown SBML Level 3 packages. * Bug fixes - The "layout" extension now provides more seamless access to L2 layout annotations in L2 models. * Additional documentation - There is now more detailed and integrated documentation describing the use of CMake as an alternative to GNU make for building and installing libSBML. ------------------------------- General libsbml-core changes ------------------------------- * New features - There are now functions will set the Qualifier on a CVTerm from a string; in addition to the existing functions that use values from the enumeration of QualifierTypes. - SBML L2 contains an number of attributes that have default values. LibSBML does not write these values out. This behaviour has changed slightly for libSBML-5. If a user explicitly sets the value of an attribute to be the default value; then it will be written out. For example setting the spatialDimensions of an L2 <compartment> to be '3' will result in a document where this is explicitly written. - In SBML L3, it is possible to have a compartment with no spatialDimensions attribute declared. LibSBML-4 would not convert such a model to L2, since an L2 compartment has spatialDimensions '3' by default. This behaviour has been altered for libSBML-5 and if the user opts for nonstrict units when applying the conversion function, a compartment with no spatialDimensions declared will be converted. - There are additional functions XMLNamespaces::getNumNamespaces and XMLAttributes::getNumAttributes. These are aliases for the existing getLength functions but are more in keeping with the rest of the API. * Bug fixes - The conversion functions for converting an L2 model to L3 were failing to set the stoichiometry value. This has been fixed. - The internalConsistencyCheck was failing to report when required attributes or elements were missing from an object. This has been corrected. - The XMLConstructorException was not exposed. It is now. * Configuration/build system changes - The header files libsbml-config-win and libsbml-config-unix have been replaced with a single libsbml-config-common file. - The organization of the source directories has been radically changed, moving the previous directories src/annotation, src/math, etc., to become subdirectories of src/sbml. This allows us to entirely avoid a step that was previously to create a copy of all the header files into <libsbml>/include. That copy operation lead to a lot of wasted time when debugging code and accidentally making changes to the wrong file. - The 'win' directory that previously containing MSVC project files has been removed. The addition of packages made maintaining this directory problematic. The CMake build system provides an easy alternative for generating any project files required. ------------------------------- Libsbml-core changes from 4.3.x ------------------------------- Also available in Version 4.3.1 (Released 2011-03-29) * New features - There is now API documentation for the MATLAB and Octave bindings. * Bug fixes - Certain versions of the libxml2 parser fail to catch a prefix being assigned to an empty namespace. Additional code has been included to catch this error if the version of libxml2 has not reported it. - The improved build of the MATLAB interface proved unsuccessful in cases where the user had a startup.m file that changed directory. This has been corrected. - The SyntaxChecker::hasExpectedXHTMLSyntax(xhtml) function had not applied the relaxation on the XHTML restrictions for SBML Level 3. This has been sorted out. - The SyntaxChecker::isValidSBMLSId(string) function was incorrectly reporting that an empty string was a valid id. This has been corrected. * Miscellaneous changes - Choosing --enable-universal-binary on MacOS 10.5 now includes all three of the following architectures: i386, x86_64, ppc. It previously only selected i386 and ppc. Also available in Version 4.3.0 (Released 2011-03-04) * New features - There was some disagreement about what libsbml when asked to write out a required attribute in Level 3 where the value of the attribute had not in fact been set. Following discussion within the libSBML team and subsequently the libsbml-development mailing list it was decided that the appropriate behaviour was to ignore the attribute when writing out the model and thus not inadvertently give the impression it has a value. - Conversion from Level 3 to Level 2 involving variable stoichiometry has now been implemented and this feature of L3 can now be converted to L2. - There is a getSupportedNamespaces function on the SBMLNamepaces class which returns a List of the SBMLNamespaces supported by this version of libSBML. - Tracker issue #2082682 The unit checking of math involving the root function has been fully addressed. Previously unit checking was only applied to the expression root(n, x) if n was an integer. It can now handle any value of n including an expression. - Checking of the units of measurement in math expressions has been further improved to provide checking to a deeper level with the overall math of the model. Thus, the units of the expression a^b can now be validated even if the value of b is assigned b = c and the model states elsewhere that c = 2. - SBML Level 3 has no default attribute values and thus a number of new isSetXYZ functions were introduced in libSBML-4.1.0. Users pointed out it was inconsistent that these functions returned 'false' for a Level 2 model in which the attribute concerned *did* have a default value. Thus, any newly introduced isSetXYZ function that deals with an attribute that had a default value in Level 2 will now return 'true' regardless of whether the user has explicitly set the function or not. - The MATLAB and Octave bindings now include the function OutputSBML() for writing the structure used in these environments back to SBML. This function has previously shipped as part of SBMLToolbox. - There is an additional constructor for an SBMLDocument object that takes an instance of SBMLNamespaces as its argument. This is similar to the constructors for all SBML objects. - There is now a custom manifest file included in the Java JAR file. It contains the version number of the libSBML release. An example program demonstrating how to access the information is included as the file examples/java/printLibSBMLVersion.java. - An API manual for the C# language bindings is now available. It is not as complete as the C++ and Java versions, but it is quite close. * Bug fixes - The InternalConsistency validator was failing to report the absence of required attributes or elements within an in-memory model. This has been sorted out with a large number of tests added. - Tracker issue #2960646 When writing out an SBML model containing the root function Octave was failing to convert the formula into the appropriate MathML. This has been fixed. - The code that checks for allowed functions in a Level 1 document was reporting an error if it encountered one of the predefined functions. This has been corrected. - Checking for NULL references has been greatly improved throughout. - The appendNotes function was not correctly checking for the xhtml namespaces declared at the top level. This has been fixed. - In some cases the facility to create new 'Bags' within CVTerms was not performing as expected. This has been sorted out. - Validation previously failed to report an error if a lambda function contained only <bvar> arguments and no actual function body. This has been fixed. - LibSBML checks that each element within a model being read has the correct default namespace. However, if the namespace had been 'declared' via a prefix this check was not being performed. This has been corrected. - The code that checked that the top-level elements of an annotation had unique namespaces was incorrectly comparing prefixes rather than actual XML namespaces. This has been fixed. Thanks to Waclaw Kusnierczyk for reporting this and supplying the fix. - The XML namespace for a <math> element may be declared on the <sbml> element. In this case, the XML namespace declaration must use a prefix. Code that checked that the MathML elements had a declared namespace failed to check whether a prefix was correctly used. This is now fixed. Thanks to the JSBML developers for spotting this. - The code that allows users to use LocalParameter and Parameter interchangeably had a small bug where it failed to spot a duplicate id for a Parameter but not a LocalParameter. This has been fixed. - If a <kineticLaw> element is present, it must contain a <math> element. Prior to SBML Level 3 Version 1 Core, this has never been explicitly stated as a validation rule but should have been reported as a schema error. In some case this was not happening. This is now fixed. - The printUnits.java example in examples/java incorrectly used getId() on SBML objects that aren't defined to have id's in SBML. Talk about setting a bad example! Fixed. * Configuration/build system changes - MATLAB 2010b introduced some inconsistencies in the build system on certain platforms. This has been fixed. In addition, the 'configure' script for Linux and MacOS no longer attempts to divine various properties of the MATLAB installation and run mex itself, and instead, invokes MATLAB to compile TranslateSBML and OutputSBML. This should lead to fewer problems building the bindings for MATLAB. - Beginning with this release, LibSBML requires SWIG version 2.0.0 or higher. This is to avoid a problem where the C# bindings will not work with .NET 4 with SWIG versions prior to 2.0.0. ====================================================================== Version 5.0.0-b1 (2010-12-31) ====================================================================== This is the first beta release of libSBML-5.0.0. There are two types of potential changes from the alpha release: those that relate to support for SBML L1, L2 and L3 core, and those that relate to support for L3 packages. These are listed separately for convenience. ------------------------- Package extension changes ------------------------- * New features - Language bindings can now be generated to include and use the package extension mechanisms. Given the slightly different nature of the MATLAB/Octave bindings, support for packages has not yet been extended to these languages. - Unit tests have been added for the code that implements the package extension mechanisms within libsbml core. - The appendAndOwn() function (used to add items to ListOf elements) has been updated to check that the item being added is appropriate for the ListOf to which it is being added. This makes use of the virtual function SBase::isValidTypeForList(). Package developers need to be aware that in cases where a ListOf element can contain items of different types, they will need to provide implementations for this function. ListOfRules provides an example; it can contain any of AlgebraicRule, AssignmentRule or RateRule. * API changes - Originally, information relating to packages, e.g. PackageName, PackageVersion, etc., was stored in static variables. This proved problematic with dynamic libraries on Windows, and therefore these variables have been replaced with static methods on the Extension classes. Example: getPackageName(). - The setEnable() and isEnable() functions have been renamed to setEnabled() and isEnabled(). - The getExtension() function now returns a clone of the required extension. This avoids a situation whereby a user could inadvertently delete an extension object. - The Check unit testing framework has been adapted to enable the tests to be run in a native Windows environment. This has lead to some slight changes in the signature of some methods in the annotation classes. C++ methods that previously return std::string now return a const std::string&. * Bug fixes - It is no longer possible to register the same extension on multiple occasions. * Configuration/build system changes - We anticipate moving from a GNU Make build system to a CMake system because this facilitates the inclusion of L3 packages. This libSBML release includes all the necessary files to use the CMake system in addition to the existing makefiles. The latter have been updated where necessary. Support for makefiles will be phased out in the near future as we move toward having package code developed by others outside of the libSBML Team. Documentation on using CMake has been included in the docs directory. * Additional documentation - README-Building_libsbml-5_with_CMake.pdf - README-Package_Integration.pdf Details how to create CMake files for package code that will enable one step integration with libsbml-5 source code or an existing libsbml-5 installation. ------------------------------- General libsbml-core changes ------------------------------- * New features - Checking of the units of measurement in math expressions has been further improved to provide checking to a deeper level with the overall math of the model. Thus, the units of the expression a^b can now be validated even if the value of b is assigned b = c and the model states elsewhere that c = 2. - SBML Level 3 has no default attribute values and thus a number of new isSetXYZ functions were introduced in libSBML-4.1.0. Users pointed out it was inconsistent that these functions returned 'false' for a Level 2 model in which the attribute concerned *did* have a default value. Thus, any newly introduced isSetXYZ function that deals with an attribute that had a default value in Level 2 will now return 'true' regardless of whever the user has explictily set the function or not. - The MATLAB and Octave bindings now include the function OutputSBML() for writing the structure used in these environments back to SBML. This function has previously shipped as part of SBMLToolbox. * Bug fixes - Checking for NULL references has been greatly improved throughtout. - Validation previously failed to report an error if a lambda function contained only <bvar> arguments and no actual function body. This has been fixed. - The documentation for a number of methods had fallen slightly out of date with respect to the possible operation return codes they could return. We've updated those documentation strings now. The methods affected are in the classes Compartment, KineticLaw, Model, Reaction, Rule, SBase, Species, Unit, UnitDefinition, and XMLToken. - A number of validation checks had an incorrect ErrorCategory labels; thus, though these were reported by the correct part of the libSBML validator, querying the category would produce an inconsistent value. These have been updated. - There were some character encoding issues in a number of error messages. These have been corrected. - The code that checked that the top-level elements of an annotation had unique namespaces was incorrectly comparing namespace prefixes, not the actual namespaces. This has been fixed. Thanks to Waclaw Kusnierczyk for reporting this and supplying the fix. - The XML namespace for a <math> element may be declared on the <sbml> element. In this case, the namespace must use a prefix. Code that checked that the MathML elements had a declared namespace failed to check whether any required prefix was correctly used. Thanks to the JSBML developers for spotting this. - The code that allows users to use LocalParameter and Parameter interchangeably had a small bug where it failed to spot a duplicate id for a Parameter but not a LocalParameter. This has been fixed. - If a <kineticLaw> element is present, it must contain a <math> element. Prior to SBML Level 3 Version 1 Core, this has never been explicitly stated as a validation rule but should have been reported as a schema error. In some case this was not happening. This is now fixed. - The 'configure' script help text incorrectly claimed that Xerces was the default XML parser; it now correctly states libxml2 is. * Configuration/build system changes - MATLAB 2010b introduced some inconsistencies in the build system on certain platforms. This has been fixed. - The organization of the source directories has been radically changed, moving the previous directories src/annotation, src/math, etc., to become subdirectories of src/sbml. This allows us to entirely avoid a step that was previously to create a copy of all the header files into <libsbml>/include. That copy operation lead to a lot of wasted time when debugging code and accidentally making changes to the wrong file. ====================================================================== Version 5.0.0-a1 (released 2010-10-05) ====================================================================== This is the next alpha release of libSBML-5. This includes full support for SBML Level 3 Core; as found in libSBML-4.2.0. It also includes mechanisms for support of a 'layout' and a 'groups' extension. This support extends to all language bindings with the exception of matlab/octave. Note these are dummy packages based on proposals for the layout and groups packages. They do not represent fully approved L3 packages. There have been no API changes from the pre-alpha release. It is anticipated that the next release (beta) will rearrange the directory structure for contributed package code and provide a new build system to facilitate the inclusion/exclusion of packages. * Changes to dependencies on 3rd-party libraries: - The language bindings now require SWIG 2.0.0 or later. * Known issues: - The C API is not yet implemented. ====================================================================== Version 5.0.0-a0 (released 2010-01-18) ====================================================================== This is a pre-alpha release of libSBML-5 which provides support for package extensions in SBML Level 3. Since libSBML-5 is currently in development stage the API may be changed in the future. Also, some features for package extensions (e.g. validation, language bindings and etc.) are not supported yet (please see "Known Issues" below). Currently, the code is based on the SVN trunk of Revision:10522 (i.e. based on 4.1.0-beta), and thus validating/converting SBML Level 3 core has not been supported yet. Please see the following bundled README files for details: (1) docs/00README-HowToUsePackageExtension.txt (For package developers) (2) docs/00README-ExtensionSupportClasses.txt (3) docs/00README-HowToImplementPackageExtension.txt (4) docs/00README-ChangesInSBase.txt * New Features: - Added new classes for supporting package extensions in 'src/extension'. - Added a new directory 'src/packages' in which additional package extensions will be located. - Added new functions for supporting package extensions in existing classes. Most of the new functions are implemented in SBase and SBMLNamespaces classes. - Added a package of layout extension as an example package in 'src/packages/layout'. The package is based on existing implementation of layout extension (implemented by Ralph Gauges) bundled with libSBML-4. "--enable-layout" option is required when running configure script to build the layout package. Example codes using the layout package are provided in "examples/layout/". Currently, the package is built as additional shared library files (e.g. libsbml-layout.a and libsbml-layout.so on Linux) that depend on the shared library of core libSBML (e.g. libsbml.a and libsbml.so on Linux) when built with make command. The package is built into existing libsbml.dll when built with MSVC on Windows. This build configuration may be changed in the future release. - Added a package of groups extension (based on the proposal on 2009-10) as another example package in 'src/packages/groups'. "--enable-groups" option is required when running configure script to build the groups package. Example codes using the groups package are provided in "examples/groups". Currently, the package is also built as additional shared library files (e.g. libsbml-groups.a and libsbml-groups.so on Linux) when built with make command whereas the package is built into libsbml.dll when built with MSVC on Windows. This build configuration may also be changed in the future release. * Changes: - Moved source files of layout extension from 'src/sbml/layout' to 'src/packages/layout'. - SBMLTypeCode_t (enum type) now contains only typecodes of SBase objects defined in the SBML core. Each package extension should define a similar enum type for typecodes of SBase objects defined in each package extension (e.g. SBMLLayoutTypeCode_t for "layout" extension (defined in LayoutExtension.h) , and SBMLGroupTypeCode_t for "groups" extension (defined in GroupExtension.h).) - Changed the type of return value of SBase::getTypeCode() and ListOf::getItemTypeCode() functions (SBMLTypeCode_t -> int). - Changed the usage of SBase::getTypeCode() and ListOf::getItemTypeCode() functions. Currently, the value of each typecode can be duplicated between those of different packages (this duplication problem doesn't happen with existing code which uses only SBase objects of the SBML core). To distinguish the typecodes of different packages, not only the return value of getTypeCode() but also that of getPackageName() should be checked as follows: void example (const SBase *sb) { const std::string pkgName = sb->getPackageName(); if (pkgName == "core") { switch (sb->getTypeCode()) { case SBML_MODEL: .... break; case SBML_REACTION: .... } } else if (pkgName == "layout") { switch (sb->getTypeCode()) { case SBML_LAYOUT_LAYOUT: .... break; case SBML_LAYOUT_REACTIONGLYPH: .... } } ... } - API changes: (- : libSBML-4 API, + : libSBML-5 API) - virtual SBMLTypeCode_t SBase::getTypeCode() const + virtual int SBase::getTypeCode() const - virtual SBMLTypeCode_t ListOf::getItemTypeCode() const + virtual int ListOf::getItemTypeCode() const - const char* SBMLTypeCode_toString (SBMLTypeCode_t typecode) + const char* SBMLTypeCode_toString (int typecode, const char* pkgName) - SBase* SBase::getAncestorOfType(SBMLTypeCode_t type) + SBase* SBase::getAncestorOfType(int type, const std::string pkgName="core") - virtual void SBase::readAttributes (const XMLAttributes& attributes) + virtual void SBase::readAttributes (const XMLAttributes& attributes, const ExpectedAttributes& expattr) * Known Issues: - Validating functions need to be extended for package extensions. - Converting functions need to be extended for package extensions. - Language bindings (SWIG configuration files and underlying support code such as local.cpp) need to be modified for supporting package extensions. Currently, language bindings of "layout" extension (Java, Python, Ruby, and C#) should work. - SBML Core and additional package extensions should be located in their own namespaces to avoid potential name conflictions. - C wrapper API needs to be added/updated. * Initial release, March 12, 2003. # The following is for [X]Emacs users. Please leave in place. # Local Variables: # fill-column: 70 # End: